From e82d74345bb8890b30e5efc808c20be2a9fc6336 Mon Sep 17 00:00:00 2001 From: "Brian P. Holt" Date: Mon, 23 Jul 2018 09:52:48 -0500 Subject: [PATCH] add support for dataset to HTMLElement (fixes #327) --- src/main/scala/org/scalajs/dom/raw/Html.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/scala/org/scalajs/dom/raw/Html.scala b/src/main/scala/org/scalajs/dom/raw/Html.scala index 8c95fb5a4..a327c270a 100644 --- a/src/main/scala/org/scalajs/dom/raw/Html.scala +++ b/src/main/scala/org/scalajs/dom/raw/Html.scala @@ -4196,6 +4196,20 @@ abstract class HTMLElement extends Element { */ override def ownerDocument: HTMLDocument = js.native + /** + * The dataset property on the HTMLElement interface provides + * read/write access to all the custom data attributes (data-*) set + * on the element. This access is available both in HTML and within + * the DOM. It is a map of DOMString, one entry for each custom + * data attribute. Note that the dataset property itself can be + * read, but not directly written. Instead, all writes must be to + * the individual properties within the dataset, which in turn + * represent the data attributes. + * + * MDN + */ + def dataset: js.Dictionary[String] = js.native + /** * fired when a pointing device is moved into an element's hit test boundaries. *