Skip to content

Fix #327: Add HTMLElement.dataset #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/main/scala/org/scalajs/dom/raw/Html.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down