An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# elem-dataset [![Build Status](https://travis-ci.org/awcross/elem-dataset.svg?branch=master)](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)