Dataset
Widely available
The dataset
API attaches and accesses custom data on elements, using either the dataset
property of HTMLElement
or attributes prefixed with data-
.
To learn more, see
DOMStringMap,
HTMLElement: dataset property,
SVGElement: dataset property at MDN.
Compatibility (view on caniuse.com)
- Chrome 7 Released on 2010-10-19
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 6 Released on 2011-08-16
- Firefox for Android 6 Released on 2011-08-16
- Safari 5.1 Released on 2011-07-20
- Safari on iOS 5 Released on 2011-10-12