mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
LibWeb: Use correct global object in legacy factories
This commit is contained in:
parent
195572dd2a
commit
5560d8a25d
2 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ JS::ThrowCompletionOr<JS::Value> AudioConstructor::call()
|
|||
JS::ThrowCompletionOr<JS::Object*> AudioConstructor::construct(FunctionObject&)
|
||||
{
|
||||
// 1. Let document be the current global object's associated Document.
|
||||
auto& window = static_cast<WindowObject&>(global_object());
|
||||
auto& window = static_cast<WindowObject&>(HTML::current_global_object());
|
||||
auto& document = window.impl().associated_document();
|
||||
|
||||
// 2. Let audio be the result of creating an element given document, audio, and the HTML namespace.
|
||||
|
|
|
@ -38,7 +38,7 @@ JS::ThrowCompletionOr<JS::Value> ImageConstructor::call()
|
|||
JS::ThrowCompletionOr<JS::Object*> ImageConstructor::construct(FunctionObject&)
|
||||
{
|
||||
// 1. Let document be the current global object's associated Document.
|
||||
auto& window = static_cast<WindowObject&>(global_object());
|
||||
auto& window = static_cast<WindowObject&>(HTML::current_global_object());
|
||||
auto& document = window.impl().associated_document();
|
||||
|
||||
// 2. Let img be the result of creating an element given document, img, and the HTML namespace.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue