mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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
Notes:
sideshowbarker
2024-07-17 19:09:28 +09:00
Author: https://github.com/Lubrsi
Commit: f71f404e0c
Pull-request: https://github.com/SerenityOS/serenity/pull/12308
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
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