summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2022-07-11 16:38:09 +0100
committerAndreas Kling <kling@serenityos.org>2022-07-11 22:35:08 +0200
commit116a7b74feef6e261b0c8c1dedffacb5a0d7e047 (patch)
treeefb9d013ebba06a724aa4753f5995ac7bd917b42 /Userland
parentee719870c84c90769c831ef3a8678aa72a219947 (diff)
downloadserenity-116a7b74feef6e261b0c8c1dedffacb5a0d7e047.zip
LibWeb: Wrap DOM::Attribute in NodeWrapperFactory
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp b/Userland/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp
index 2040879901..c3a7370c72 100644
--- a/Userland/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/NodeWrapperFactory.cpp
@@ -5,6 +5,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <LibWeb/Bindings/AttributeWrapper.h>
#include <LibWeb/Bindings/CharacterDataWrapper.h>
#include <LibWeb/Bindings/CommentWrapper.h>
#include <LibWeb/Bindings/DocumentFragmentWrapper.h>
@@ -351,6 +352,8 @@ NodeWrapper* wrap(JS::GlobalObject& global_object, DOM::Node& node)
return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::Text>(node)));
if (is<DOM::CharacterData>(node))
return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::CharacterData>(node)));
+ if (is<DOM::Attribute>(node))
+ return static_cast<NodeWrapper*>(wrap_impl(global_object, verify_cast<DOM::Attribute>(node)));
return static_cast<NodeWrapper*>(wrap_impl(global_object, node));
}