summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Node.h
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2021-04-10 17:21:22 -0700
committerAndreas Kling <kling@serenityos.org>2021-04-11 09:40:06 +0200
commit988c23fff05238dbd1c1899a862bdb4b42b93c73 (patch)
treef3fa248407334abba2b83f5675cfb707b78d8f04 /Userland/Libraries/LibWeb/DOM/Node.h
parent0f8932d7ab1bdf598011e138377461fe1f731fa5 (diff)
downloadserenity-988c23fff05238dbd1c1899a862bdb4b42b93c73.zip
LibWeb: Add implementation of Node.compareDocumentPosition()
While looking into getting Duck Duck Go loading further in the Browser, I noticed that it was complaining about the missing method Node.compareDocumentPosition. This change implements as much of the DOM spec as possible with the current implementation of the DOM to date. The implementation is validated by new tests in the Node.js.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Node.h')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Node.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h
index 946279ae45..0cb36d0113 100644
--- a/Userland/Libraries/LibWeb/DOM/Node.h
+++ b/Userland/Libraries/LibWeb/DOM/Node.h
@@ -100,6 +100,7 @@ public:
void insert_before(NonnullRefPtr<Node> node, RefPtr<Node> child, bool suppress_observers = false);
void remove(bool suppress_observers = false);
void remove_all_children(bool suppress_observers = false);
+ u16 compare_document_position(RefPtr<Node> other);
// NOTE: This is intended for the JS bindings.
bool has_child_nodes() const { return has_children(); }