mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Expose Node.ownerDocument
Required by jQuery.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 18:46:00 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/8bafbdddc6b Pull-request: https://github.com/SerenityOS/serenity/pull/6824
@@ -539,4 +539,12 @@ bool Node::is_host_including_inclusive_ancestor_of(const Node& other) const
|
||||
return is_inclusive_ancestor_of(other) || (is<DocumentFragment>(other.root()) && downcast<DocumentFragment>(other.root())->host() && is_inclusive_ancestor_of(*downcast<DocumentFragment>(other.root())->host().ptr()));
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-node-ownerdocument
|
||||
RefPtr<Document> Node::owner_document() const
|
||||
{
|
||||
if (is_document())
|
||||
return nullptr;
|
||||
return m_document;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user