LibWeb: Return NonnullGCPtr<DOMTokenList> from relList getters

This commit is contained in:
Tim Ledbetter
2024-05-18 05:54:15 +01:00
committed by Andreas Kling
parent b4af851c74
commit fc395716e9
8 changed files with 12 additions and 12 deletions

View File

@@ -91,12 +91,12 @@ void HTMLLinkElement::inserted()
}
// https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist
JS::GCPtr<DOM::DOMTokenList> HTMLLinkElement::rel_list()
JS::NonnullGCPtr<DOM::DOMTokenList> HTMLLinkElement::rel_list()
{
// The relList IDL attribute must reflect the rel content attribute.
if (!m_rel_list)
m_rel_list = DOM::DOMTokenList::create(*this, HTML::AttributeNames::rel);
return m_rel_list;
return *m_rel_list;
}
bool HTMLLinkElement::has_loaded_icon() const