mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Add disallow further import maps steps to ESO
This commit is contained in:
committed by
Linus Groh
parent
794dc2e16b
commit
9afea1248f
Notes:
sideshowbarker
2024-07-17 12:02:22 +09:00
Author: https://github.com/networkException Commit: https://github.com/SerenityOS/serenity/commit/9afea1248f Pull-request: https://github.com/SerenityOS/serenity/pull/15758 Reviewed-by: https://github.com/davidot ✅ Reviewed-by: https://github.com/linusg ✅
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user