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:
parent
794dc2e16b
commit
9afea1248f
Notes:
sideshowbarker
2024-07-17 12:02:22 +09:00
Author: https://github.com/networkException
Commit: 9afea1248f
Pull-request: https://github.com/SerenityOS/serenity/pull/15758
Reviewed-by: https://github.com/davidot ✅
Reviewed-by: https://github.com/linusg ✅
2 changed files with 16 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue