https://github.com/awcross/elem-dataset
HTMLElement.dataset ponyfill
https://github.com/awcross/elem-dataset
attributes dataset elem-dataset html polyfill ponyfill
Last synced: about 1 month ago
JSON representation
HTMLElement.dataset ponyfill
- Host: GitHub
- URL: https://github.com/awcross/elem-dataset
- Owner: awcross
- License: mit
- Created: 2016-10-06T00:32:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-14T06:03:37.000Z (over 6 years ago)
- Last Synced: 2025-04-17T17:41:09.058Z (2 months ago)
- Topics: attributes, dataset, elem-dataset, html, polyfill, ponyfill
- Language: JavaScript
- Size: 13.7 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# elem-dataset [](https://travis-ci.org/awcross/elem-dataset)
> HTML5 [`HTMLElement.dataset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset) [ponyfill](https://ponyfill.com)
*Note that "true" and "false" values are [not allowed on boolean attributes](https://w3c.github.io/html/infrastructure.html#sec-boolean-attributes).*
## Install
```
$ npm install --save elem-dataset
```## Usage
```js
import elementDataset from 'elem-dataset';const element = document.querySelector('.foo');
const attributes = elementDataset(element);
```## License
MIT © [Alex Cross](https://alexcross.io)