mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibWeb: Introduce the Environment Settings Object
The environment settings object is effectively the context a piece of script is running under, for example, it contains the origin, responsible document, realm, global object and event loop for the current context. This effectively replaces ScriptExecutionContext, but it cannot be removed in this commit as EventTarget still depends on it. https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object
This commit is contained in:
parent
4db5406d62
commit
f71f404e0c
29 changed files with 883 additions and 86 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <LibWeb/HTML/DocumentReadyState.h>
|
||||
#include <LibWeb/HTML/HTMLScriptElement.h>
|
||||
#include <LibWeb/HTML/History.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
|
@ -171,7 +172,8 @@ public:
|
|||
const String& source() const { return m_source; }
|
||||
void set_source(const String& source) { m_source = source; }
|
||||
|
||||
virtual JS::Realm& realm() override;
|
||||
HTML::EnvironmentSettingsObject& relevant_settings_object();
|
||||
JS::Realm& realm();
|
||||
JS::Interpreter& interpreter();
|
||||
|
||||
JS::Value run_javascript(StringView source, StringView filename = "(unknown)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue