mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02: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:
@@ -99,6 +99,16 @@
|
||||
} __testjs_common_run_file {}; \
|
||||
::Test::JS::IntermediateRunFileResult __TestJS_run_file::hook(__VA_ARGS__)
|
||||
|
||||
#define TESTJS_CREATE_INTERPRETER_HOOK(...) \
|
||||
struct __TestJS_create_interpreter_hook { \
|
||||
__TestJS_create_interpreter_hook() \
|
||||
{ \
|
||||
::Test::JS::g_create_interpreter_hook = hook; \
|
||||
} \
|
||||
static NonnullOwnPtr<JS::Interpreter> hook(); \
|
||||
} __testjs_create_interpreter_hook {}; \
|
||||
NonnullOwnPtr<JS::Interpreter> __TestJS_create_interpreter_hook::hook(__VA_ARGS__)
|
||||
|
||||
namespace Test::JS {
|
||||
|
||||
namespace JS = ::JS;
|
||||
@@ -128,6 +138,7 @@ extern String g_test_root;
|
||||
extern int g_test_argc;
|
||||
extern char** g_test_argv;
|
||||
extern Function<void()> g_main_hook;
|
||||
extern Function<NonnullOwnPtr<JS::Interpreter>()> g_create_interpreter_hook;
|
||||
extern HashMap<bool*, Tuple<String, String, char>> g_extra_args;
|
||||
|
||||
struct ParserError {
|
||||
|
||||
Reference in New Issue
Block a user