diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp b/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp index 4b3575920f..439d9a3606 100644 --- a/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp +++ b/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp @@ -8,11 +8,11 @@ #include <AK/CharacterTypes.h> #include <AK/StringBuilder.h> #include <LibWeb/Bindings/DOMTokenListPrototype.h> -#include <LibWeb/Bindings/WindowObject.h> #include <LibWeb/DOM/DOMException.h> #include <LibWeb/DOM/DOMTokenList.h> #include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Element.h> +#include <LibWeb/HTML/Window.h> namespace { @@ -56,13 +56,13 @@ namespace Web::DOM { DOMTokenList* DOMTokenList::create(Element const& associated_element, FlyString associated_attribute) { - auto& realm = associated_element.document().preferred_window_object().realm(); + auto& realm = associated_element.document().window().realm(); return realm.heap().allocate<DOMTokenList>(realm, associated_element, move(associated_attribute)); } // https://dom.spec.whatwg.org/#ref-for-domtokenlist%E2%91%A0%E2%91%A2 DOMTokenList::DOMTokenList(Element const& associated_element, FlyString associated_attribute) - : Bindings::LegacyPlatformObject(associated_element.document().preferred_window_object().ensure_web_prototype<Bindings::DOMTokenListPrototype>("DOMTokenList")) + : Bindings::LegacyPlatformObject(associated_element.document().window().ensure_web_prototype<Bindings::DOMTokenListPrototype>("DOMTokenList")) , m_associated_element(associated_element) , m_associated_attribute(move(associated_attribute)) { @@ -225,7 +225,7 @@ String DOMTokenList::value() const // https://dom.spec.whatwg.org/#ref-for-concept-element-attributes-set-value%E2%91%A2 void DOMTokenList::set_value(String value) { - auto associated_element = m_associated_element.strong_ref(); + JS::GCPtr<DOM::Element> associated_element = m_associated_element.ptr(); if (!associated_element) return; @@ -244,7 +244,7 @@ ExceptionOr<void> DOMTokenList::validate_token(StringView token) const // https://dom.spec.whatwg.org/#concept-dtl-update void DOMTokenList::run_update_steps() { - auto associated_element = m_associated_element.strong_ref(); + JS::GCPtr<DOM::Element> associated_element = m_associated_element.ptr(); if (!associated_element) return; |