mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibWeb: Replace ScriptExecutionContext::interpreter() with realm()
Here goes another step towards Document not having a JS::Interpreter.
This commit is contained in:
parent
7a6ad1b19c
commit
e649144a90
4 changed files with 10 additions and 5 deletions
|
@ -133,7 +133,7 @@ void EventTarget::set_event_handler_attribute(FlyString const& name, HTML::Event
|
|||
dbgln("Failed to parse script in event handler attribute '{}'", name);
|
||||
return;
|
||||
}
|
||||
auto* function = JS::OrdinaryFunctionObject::create(target->script_execution_context()->interpreter().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, JS::FunctionKind::Regular, false, false);
|
||||
auto* function = JS::OrdinaryFunctionObject::create(target->script_execution_context()->realm().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, JS::FunctionKind::Regular, false, false);
|
||||
VERIFY(function);
|
||||
listener = adopt_ref(*new DOM::EventListener(JS::make_handle(static_cast<JS::FunctionObject*>(function))));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue