Skip to content

Commit ef1f303

Browse files
bpholtsjrd
authored andcommitted
Fix #327: Add HTMLElement.dataset (#337)
1 parent a2bdc55 commit ef1f303

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/scala/org/scalajs/dom/raw/Html.scala

+14
Original file line numberDiff line numberDiff line change
@@ -4196,6 +4196,20 @@ abstract class HTMLElement extends Element {
41964196
*/
41974197
override def ownerDocument: HTMLDocument = js.native
41984198

4199+
/**
4200+
* The dataset property on the HTMLElement interface provides
4201+
* read/write access to all the custom data attributes (data-*) set
4202+
* on the element. This access is available both in HTML and within
4203+
* the DOM. It is a map of DOMString, one entry for each custom
4204+
* data attribute. Note that the dataset property itself can be
4205+
* read, but not directly written. Instead, all writes must be to
4206+
* the individual properties within the dataset, which in turn
4207+
* represent the data attributes.
4208+
*
4209+
* MDN
4210+
*/
4211+
def dataset: js.Dictionary[String] = js.native
4212+
41994213
/**
42004214
* fired when a pointing device is moved into an element's hit test boundaries.
42014215
*

0 commit comments

Comments
 (0)