mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 12:15:07 +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
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <LibJS/AST.h>
|
||||
#include <LibJS/Bytecode/Generator.h>
|
||||
#include <LibJS/Runtime/ExecutionContext.h>
|
||||
#include <LibJS/Runtime/FunctionObject.h>
|
||||
|
||||
namespace JS {
|
||||
|
@ -86,6 +87,10 @@ public:
|
|||
|
||||
FunctionKind kind() const { return m_kind; }
|
||||
|
||||
// This is used by LibWeb to disassociate event handler attribute callback functions from the nearest script on the call stack.
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler Step 3.11
|
||||
void set_script_or_module(ScriptOrModule script_or_module) { m_script_or_module = move(script_or_module); }
|
||||
|
||||
protected:
|
||||
virtual bool is_strict_mode() const final { return m_strict; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue