mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Implement Node.contains
Used by Web Components Polyfills.
This commit is contained in:
parent
a826df773e
commit
9cae827f07
Notes:
sideshowbarker
2024-07-18 10:24:02 +09:00
Author: https://github.com/Lubrsi
Commit: 9cae827f07
Pull-request: https://github.com/SerenityOS/serenity/pull/8449
3 changed files with 9 additions and 0 deletions
|
@ -649,4 +649,10 @@ bool Node::is_scripting_disabled() const
|
|||
return !document().browsing_context();
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-contains
|
||||
bool Node::contains(RefPtr<Node> other) const
|
||||
{
|
||||
return other && other->is_inclusive_descendant_of(*this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue