details-element-polyfill
Version:
HTML <details> element polyfill
34 lines (20 loc) • 1.18 kB
Markdown
# [HTML `<details>` Element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) Polyfill
<details open><summary><strong>Implemented Features</strong></summary>
* Toggling on click
* Toggling with `element.open = true` and `element.open = false`
* Toggling with `element.setAttribute("open", "")` and `element.removeAttribute("open")`
* Toggling with <kbd>enter</kbd> and <kbd>space</kbd>
* Dispatching the [`toggle` event](http://www.w3schools.com/jsref/event_ontoggle.asp)
* Focus support
</details>
<details open><summary><strong>Install</strong></summary>
* Download **_↝_ [details-element-polyfill.js](https://raw.githubusercontent.com/javan/details-element-polyfill/master/dist/details-element-polyfill.js)**
* npm **_↝_ [details-element-polyfill](https://www.npmjs.com/package/details-element-polyfill)**
</details>
<details><summary><strong>Browser Support</strong></summary>
[](https://saucelabs.com/u/details-polyfill)
</details>
<details><summary><strong>Fine Print</strong></summary>
Licensed under the [MIT License](LICENSE)
© 2019 Javan Makhmali
</details>