1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:45:09 +00:00

LibWeb: Implement ModuleMap and expose it on EnvironmentSettingsObject

This patch adds the ModuleMap class used to keep track of the type and
url of a module as well as the fetching state associated. Each
environment settings object now also has a module map.
This commit is contained in:
networkException 2022-10-03 20:58:36 +02:00 committed by Andreas Kling
parent 83554526f0
commit 992311c0ee
5 changed files with 143 additions and 1 deletions

View file

@ -11,6 +11,7 @@
#include <LibWeb/HTML/PromiseRejectionEvent.h>
#include <LibWeb/HTML/Scripting/Environments.h>
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
#include <LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h>
#include <LibWeb/HTML/Window.h>
#include <LibWeb/Page/Page.h>
@ -34,6 +35,11 @@ JS::ExecutionContext& EnvironmentSettingsObject::realm_execution_context()
return *m_realm_execution_context;
}
ModuleMap& EnvironmentSettingsObject::module_map()
{
return m_module_map;
}
// https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object%27s-realm
JS::Realm& EnvironmentSettingsObject::realm()
{