mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWeb: Set inertness of HTMLElement when inert attribute is changed
This commit is contained in:
committed by
Sam Atkins
parent
893e9e3eac
commit
a9ffc6359a
@@ -2110,6 +2110,17 @@ bool Node::is_default_namespace(Optional<String> namespace_) const
|
||||
return default_namespace == namespace_;
|
||||
}
|
||||
|
||||
bool Node::is_inert() const
|
||||
{
|
||||
if (auto* html_element = as_if<HTML::HTMLElement>(*this))
|
||||
return html_element->is_inert();
|
||||
|
||||
if (auto* enclosing_html_element = this->enclosing_html_element())
|
||||
return enclosing_html_element->is_inert();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#in-a-document-tree
|
||||
bool Node::in_a_document_tree() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user