mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
LibWeb: Use correct global object in legacy factories
This commit is contained in:
parent
195572dd2a
commit
5560d8a25d
Notes:
sideshowbarker
2024-07-17 14:27:10 +09:00
Author: https://github.com/Igoorx
Commit: 5560d8a25d
Pull-request: https://github.com/SerenityOS/serenity/pull/13506
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