1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

LibWeb: Add disallow further import maps steps to ESO

This commit is contained in:
networkException 2022-10-23 04:06:19 +02:00 committed by Linus Groh
parent 794dc2e16b
commit 9afea1248f
Notes: sideshowbarker 2024-07-17 12:02:22 +09:00
2 changed files with 16 additions and 0 deletions

View file

@ -293,6 +293,20 @@ bool EnvironmentSettingsObject::module_type_allowed(AK::String const& module_typ
return true;
}
// https://html.spec.whatwg.org/multipage/webappapis.html#disallow-further-import-maps
void EnvironmentSettingsObject::disallow_further_import_maps()
{
// 1. Let global be settingsObject's global object.
auto& global = global_object();
// 2. If global does not implement Window, then return.
if (!is<Window>(global))
return;
// 3. Set global's import maps allowed to false.
verify_cast<Window>(global).set_import_maps_allowed(false);
}
// https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object
EnvironmentSettingsObject& incumbent_settings_object()
{