diff options
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp index b657468de5..d735f17660 100644 --- a/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp +++ b/Userland/Libraries/LibWeb/Bindings/AudioConstructor.cpp @@ -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. diff --git a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp index 2c0a9adf9f..6f839b1acc 100644 --- a/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp +++ b/Userland/Libraries/LibWeb/Bindings/ImageConstructor.cpp @@ -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. |