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 AudioConstructor::call() JS::ThrowCompletionOr AudioConstructor::construct(FunctionObject&) { // 1. Let document be the current global object's associated Document. - auto& window = static_cast(global_object()); + auto& window = static_cast(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 ImageConstructor::call() JS::ThrowCompletionOr ImageConstructor::construct(FunctionObject&) { // 1. Let document be the current global object's associated Document. - auto& window = static_cast(global_object()); + auto& window = static_cast(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.