1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Wrap DOM::Attribute in NodeWrapperFactory

This commit is contained in:
Luke Wilde 2022-07-11 16:38:09 +01:00 committed by Andreas Kling
parent ee719870c8
commit 116a7b74fe

View file

@ -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));
}