mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibWeb: Add support for HTMLOrSVGElement.dataset
This commit is contained in:
parent
37347cbcb6
commit
f6b24a72ee
12 changed files with 259 additions and 1 deletions
|
@ -10,6 +10,7 @@ namespace Web::SVG {
|
|||
|
||||
SVGElement::SVGElement(DOM::Document& document, QualifiedName qualified_name)
|
||||
: Element(document, move(qualified_name))
|
||||
, m_dataset(HTML::DOMStringMap::create(*this))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/DOMStringMap.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
||||
|
@ -16,8 +17,12 @@ public:
|
|||
|
||||
virtual bool requires_svg_container() const override { return true; }
|
||||
|
||||
NonnullRefPtr<HTML::DOMStringMap> dataset() const { return m_dataset; }
|
||||
|
||||
protected:
|
||||
SVGElement(DOM::Document&, QualifiedName);
|
||||
|
||||
NonnullRefPtr<HTML::DOMStringMap> m_dataset;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
interface SVGElement : Element {
|
||||
|
||||
// FIXME: This should come from a HTMLOrSVGElement mixin
|
||||
[SameObject] readonly attribute DOMStringMap dataset;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue