From 80a06fa67249a554a7618ebe7d89b1adebad2dc3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 31 Aug 2023 12:22:40 +0200 Subject: [PATCH] LibWeb: Use relevant_global_object in lookup_custom_element_definition --- Userland/Libraries/LibWeb/DOM/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 27e4e81548..e757da3f59 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -2436,7 +2436,7 @@ JS::GCPtr Document::lookup_custom_element_definit return nullptr; // 3. Let registry be document's relevant global object's CustomElementRegistry object. - auto registry = window().custom_elements(); + auto registry = verify_cast(relevant_global_object(*this)).custom_elements(); // 4. If there is custom element definition in registry with name and local name both equal to localName, return that custom element definition. auto converted_local_name = String::from_deprecated_string(local_name).release_value_but_fixme_should_propagate_errors();