LibWeb: Implement Node.cloneNode()

With this we can now successfully run a Vue.js 2 hello world! :^)
This commit is contained in:
Linus Groh 2021-04-14 01:25:10 +02:00 committed by Andreas Kling
commit 5da4c9bf1e
Notes: sideshowbarker 2024-07-18 20:24:17 +09:00
4 changed files with 71 additions and 1 deletions

View file

@ -102,6 +102,9 @@ public:
void remove_all_children(bool suppress_observers = false);
u16 compare_document_position(RefPtr<Node> other);
NonnullRefPtr<Node> clone_node(Document* document = nullptr, bool clone_children = false) const;
ExceptionOr<NonnullRefPtr<Node>> clone_node_binding(bool deep) const;
// NOTE: This is intended for the JS bindings.
bool has_child_nodes() const { return has_children(); }
NonnullRefPtrVector<Node> child_nodes() const;