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

LibWeb: Add HTMLElement wrapper

Expose the "title" attribute just to expose something. :^)
This commit is contained in:
Andreas Kling 2020-06-21 14:35:00 +02:00
parent 244b243d22
commit 1914f52371
10 changed files with 36 additions and 14 deletions

View file

@ -28,6 +28,7 @@
#include <LibWeb/Bindings/DocumentWrapper.h>
#include <LibWeb/Bindings/HTMLCanvasElementWrapper.h>
#include <LibWeb/Bindings/HTMLImageElementWrapper.h>
#include <LibWeb/Bindings/HTMLElementWrapper.h>
#include <LibWeb/Bindings/NodeWrapper.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/HTMLCanvasElement.h>
@ -45,6 +46,8 @@ NodeWrapper* wrap(JS::Heap& heap, Node& node)
return static_cast<NodeWrapper*>(wrap_impl(heap, to<HTMLCanvasElement>(node)));
if (is<HTMLImageElement>(node))
return static_cast<NodeWrapper*>(wrap_impl(heap, to<HTMLImageElement>(node)));
if (is<HTMLElement>(node))
return static_cast<NodeWrapper*>(wrap_impl(heap, to<HTMLElement>(node)));
if (is<Element>(node))
return static_cast<NodeWrapper*>(wrap_impl(heap, to<Element>(node)));
return static_cast<NodeWrapper*>(wrap_impl(heap, node));