{"_id":"details-polyfill","_rev":"8-6d993765fd1cbb655578387b7d22135f","name":"details-polyfill","description":"Polyfill for the HTML5 `<details>` element","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"details-polyfill","version":"1.0.0","description":"Polyfill for the HTML5 `<details>` element","main":"index.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/rstacruz/details-polyfill.git"},"keywords":["details","summary","html5","polyfill"],"author":{"name":"Rico Sta. Cruz","email":"rico@ricostacruz.com"},"license":"MIT","bugs":{"url":"https://github.com/rstacruz/details-polyfill/issues"},"homepage":"https://github.com/rstacruz/details-polyfill#readme","gitHead":"e87fb94433f6f206d17c00b42ab9a7defb7623ff","_id":"details-polyfill@1.0.0","_shasum":"48e190e6b5398bcc6ccc5e4f863c78dbc10c1bdb","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"rstacruz","email":"dropbox@ricostacruz.com"},"dist":{"shasum":"48e190e6b5398bcc6ccc5e4f863c78dbc10c1bdb","tarball":"https://registry.npmjs.org/details-polyfill/-/details-polyfill-1.0.0.tgz","integrity":"sha512-shl3IB+ysLf7kCz7EiJQZGyXyIxwEBxZySQ7P3Km0zj1r/jWqJWLQbCJ4G+cwbSEaOV0VSCggpBPjLmpXITSAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHsmMbZygvdaHBBBey4jX0eM77+WeLcN6JdwwB/jQl8WAiAngsKVmJ8bOfWLFwZ/Siya4iL1HtvJFtgiLTj1el5aFw=="}]},"maintainers":[{"name":"rstacruz","email":"dropbox@ricostacruz.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/details-polyfill-1.0.0.tgz_1469649539459_0.7094860998913646"}},"1.0.1":{"name":"details-polyfill","version":"1.0.1","description":"Polyfill for the HTML5 `<details>` element","main":"index.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/rstacruz/details-polyfill.git"},"keywords":["details","summary","html5","polyfill"],"author":{"name":"Rico Sta. Cruz","email":"rico@ricostacruz.com"},"license":"MIT","bugs":{"url":"https://github.com/rstacruz/details-polyfill/issues"},"homepage":"https://github.com/rstacruz/details-polyfill#readme","files":["index.js"],"gitHead":"62529c173050d6e78c3d27101ef93e891ca32c41","_id":"details-polyfill@1.0.1","_shasum":"0e355a0de437b61915c8a06c8d0ad5fc1e952463","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"rstacruz","email":"dropbox@ricostacruz.com"},"dist":{"shasum":"0e355a0de437b61915c8a06c8d0ad5fc1e952463","tarball":"https://registry.npmjs.org/details-polyfill/-/details-polyfill-1.0.1.tgz","integrity":"sha512-Va59aTdLempcRcuJaQNnxXQ/IrFz1vWH4AeyiKrJf34WCmvdoWUb1tY0ge21vMiTZ+WAyFpl0oxpQunhQzCXpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqGGTQdv8s/rw+1xjl9TkpJZo57kqEUCA2AUVo1SrC/QIgIgztu4DV9TJ4y6/CjhUvdXQ4y/4XkmeF2IBuO7TBJRA="}]},"maintainers":[{"name":"rstacruz","email":"dropbox@ricostacruz.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/details-polyfill-1.0.1.tgz_1469651523033_0.7227406115271151"}},"1.0.2":{"name":"details-polyfill","version":"1.0.2","description":"Polyfill for the HTML5 `<details>` element","main":"index.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/rstacruz/details-polyfill.git"},"keywords":["details","summary","html5","polyfill"],"author":{"name":"Rico Sta. Cruz","email":"rico@ricostacruz.com"},"license":"MIT","bugs":{"url":"https://github.com/rstacruz/details-polyfill/issues"},"homepage":"https://github.com/rstacruz/details-polyfill#readme","files":["index.js"],"gitHead":"862746cba60641dc8c87986b6c6b27152bf45a47","_id":"details-polyfill@1.0.2","_shasum":"81d93e5508950870516a7a354a71fad51786836f","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"rstacruz","email":"dropbox@ricostacruz.com"},"dist":{"shasum":"81d93e5508950870516a7a354a71fad51786836f","tarball":"https://registry.npmjs.org/details-polyfill/-/details-polyfill-1.0.2.tgz","integrity":"sha512-JbGgU9rE5oIfBYtEZhRMcPfPq9mn1078Nd8gA44+eJTgyrREbgKZOJ0gIM1iVzPC3BYPSMgEmNL8YL3ZyWsH8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD57estLG8FiVefyKxOi+fZfDBRtnU2nYcPnKaJMnArIwIhAIGiIfrSE3cfL4sRqcBd5/ycIE6Dl58Qb3ysUuVEhFqW"}]},"maintainers":[{"name":"rstacruz","email":"dropbox@ricostacruz.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/details-polyfill-1.0.2.tgz_1469789768542_0.6767784410621971"}},"1.1.0":{"name":"details-polyfill","version":"1.1.0","description":"Polyfill for the HTML5 `<details>` element","main":"index.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/rstacruz/details-polyfill.git"},"keywords":["details","summary","html5","polyfill"],"author":{"name":"Rico Sta. Cruz","email":"rico@ricostacruz.com"},"license":"MIT","bugs":{"url":"https://github.com/rstacruz/details-polyfill/issues"},"homepage":"https://github.com/rstacruz/details-polyfill#readme","files":["index.js"],"gitHead":"34de27b64fec4c8ff32808568a22434361d0d329","_id":"details-polyfill@1.1.0","_npmVersion":"5.0.0","_nodeVersion":"6.9.5","_npmUser":{"name":"rstacruz","email":"dropbox@ricostacruz.com"},"dist":{"integrity":"sha512-YARtvrZ+FobZBMjfAyCxNZ5Cm5riB2tKMsdUQvTFnCvg3OeAkOGCoSxgDZT0uAXV+t5zgJYMGWd/ftVI6v8I0w==","shasum":"d6d71be0885560e7afca42688b03ff379fd80e56","tarball":"https://registry.npmjs.org/details-polyfill/-/details-polyfill-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDd0AUId4iP4p8xi6sog9whl1VYQeqAwizUJZZxVdDaMQIhAMtbMkDXNKCU5hgnCA4FUAJ9hWLm2YXn8RJJ9uPZU1yx"}]},"maintainers":[{"name":"rstacruz","email":"dropbox@ricostacruz.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/details-polyfill-1.1.0.tgz_1495940687001_0.4226075941696763"}},"1.2.0":{"name":"details-polyfill","version":"1.2.0","description":"Polyfill for the HTML5 `<details>` element","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 0"},"repository":{"type":"git","url":"git+https://github.com/rstacruz/details-polyfill.git"},"keywords":["details","summary","html5","polyfill"],"author":{"name":"Rico Sta. Cruz","email":"rico@ricostacruz.com"},"license":"MIT","bugs":{"url":"https://github.com/rstacruz/details-polyfill/issues"},"homepage":"https://github.com/rstacruz/details-polyfill#readme","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2018 Rico Sta. Cruz\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"details-polyfill@1.2.0","dist":{"shasum":"daa3e84d3842fee2555118ee1a521fa53bb1392f","integrity":"sha512-jnozpT1eo4c61PGY14Hv1zzqRW+jbrYt8kvd2QwLO9wec0yD0o+3U+CE8SDS4zCRYjZmSedi6Wln5y91VFrZEg==","tarball":"https://registry.npmjs.org/details-polyfill/-/details-polyfill-1.2.0.tgz","fileCount":6,"unpackedSize":8267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUEGOCRA9TVsSAnZWagAApBsP/2qZ+VBmhP+4oZx4BwHs\nPOakF95mShzuCJVD29cpDPhyG7xrDLxNBALMgzeJOqRm15C16g3xEh1vw+rC\nK9EVYOMn65ntNmv7Nbs6YfQcgsUYE9ScrZPnhExXBdrANqTrjzeiXRu2VR3J\nGM7CqIizkDg1Y5jgcccO3V1xTP6qvT50tJnMoyTF8lMbnDMP0Mny8ENL1mPm\nTkIPr/uWApLg5KE8efI5oc1zGwRSGNFjrUaZFIF2VrpKOZOxhTAASTkcWXSo\nhhFnm7w7cx+pHIasjP3m72d5b77ml/wN9fVNC3jin34oV8YPDv3bWbD7BLtr\nHpm0rRuGUXcK+S/lbcoIH52mgXrV7McIgJJfy2KQ8BGBRE/gaVxxGWMVVuFa\n/w3Z5xorg2URV+lY1gO7mv9eVcNt8ticeTzb7S9fNvtD/4FC73Mh1xzxjNmN\npOJFgQh1WhvbiZpvYMdH5zNgSXmzloKQo3/9I91Aq+bQVI/cyX7OmbS2yiGB\ngpmW9f1r3n1K7elyADMhG4JrWtut9+EVIeClvvJTdssJxCydLBvdpkwtBsax\noidvyTq7zspm2Q/o1zGzzzVuc0CxvQ8EXl0hkHo6CIsXnmkutinyOEL7ZP2/\naodix43ya420qGMLydVZu0zcDh6pcdMoutdX2vccqYTMKhXUJrPF8y/b98KI\ngVm1\r\n=hBTh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDR6Y/oPosEZXtPDv4aSUDi5huIgXkJ61qacGVf4NkbYAiAiEX2JNhWV44CW9QOdbMcETqPAqsAlpWUFBr3zR0sWiA=="}]},"_npmUser":{"name":"rstacruz","email":"dropbox@ricostacruz.com"},"directories":{},"maintainers":[{"name":"rstacruz","email":"dropbox@ricostacruz.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/details-polyfill_1.2.0_1615872398064_0.2539916895224008"},"_hasShrinkwrap":false}},"readme":"# details-polyill\n\n> Polyfill for the HTML5 `<details>` element, no dependencies\n\n![](docs/images/details-polyfill.gif)\n\n<br>\n\nUsage\n-----\n\ndetails-polyfill is available via npm.\n\n```\nnpm install --save details-polyfill\n```\n\nRequiring it will immediately inject the needed behaviors.\n\n```js\nrequire('details-polyfill')\n```\n\nThe file [index.js](index.js) is also usable as a standalone script.\n\n<br>\n\nHow it works\n------------\n\n<details>\n<summary>Just include the script on any page that uses <code>&lt;details&gt;</code>.</summary>\n\nIn case the browser doesn't support `<details>`, it adds the following behaviors:\n\n  - When clicking `details > summary`, it toggles the `open` attribute in `details`.\n\nIt also adds these CSS styles:\n\n  - `summary:before` is styled with a disclosure triangle.\n  - `details:not([open]) > :not(summary)` elements are hidden. (that is: all children of closed `details`, except `summary`)\n  - The `<html>` element gets the `no-details` class.\n \n</details>\n\nLimitations\n-----------\n\n<details>\n<summary>Keep these guidelines in mind.</summary>\n\n#### No loose text\n\nThe `<details>` element must not have loose text inside it. Everything inside it should be in elements.\n\n```html\n<!-- ✗ This will NOT work -->\n<details>\n  <summary>More info...</summary>\n  No info available.\n</details>\n```\n\n```html\n<!-- ✓ But this will -->\n<details>\n  <summary>More info...</summary>\n  <span>No info available.</span>\n</details>\n```\n\n#### Don't style summary::before\n...unless it's for a disclosure triangle. This library uses `summary::before` to create a default triangle.\n\n#### Summary as first child\nThe `summary` element must also be the first child of the `details` element. Browsers supporting the `details` element natively will hoist `summary` elements up, but details-polyfill.js won't.\n\n#### JavaScript `el.open = true`\n...will not work like how you think it does. You also need to do `.setAttribute('open', 'open')` or `.removeAttribute('open')`.\n\n</details>\n\n\nAlternatives\n------------\n\n<details>\n<summary>Here are a few other polyfills for <code>&lt;details&gt;</code>.</summary>\n\nI wrote this because everything else out there either depend on big libraries, or are too complicated. In contrast, `details-polyfill` has <100 lines of code, and only comes with a *.js* file.\n\n* [better-details-polyfill](https://github.com/chemerisuk/better-details-polyfill) - depends on better-dom-boilerplate.\n* [manuelbieh/Details-Polyfill](https://github.com/manuelbieh/Details-Polyfill) - depends on jQuery.\n* [html5-details-jquery](https://mathiasbynens.be/notes/html5-details-jquery) - depends on jQuery.\n* [jquery-deets](https://github.com/Akkuma/jquery-deets) - depends on jQuery UI.\n* [Element.details](https://github.com/termi/Element.details) - supports legacy IE, but is harder to implement (has `.htc` files).\n* [Complete polyfill for the HTML5 details element](https://www.smashingmagazine.com/2014/11/complete-polyfill-html5-details-element/) (smashingmagazine.com)\n* [Cross browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#details-and-summary) (github.com/modernizr)\n\n</details>\n\nThanks\n------\n\n**details-polyfill** © 2016+, Rico Sta. Cruz. Released under the [MIT] License.<br>\nAuthored and maintained by Rico Sta. Cruz with help from contributors ([list][contributors]).\n\n> [ricostacruz.com](http://ricostacruz.com) &nbsp;&middot;&nbsp;\n> GitHub [@rstacruz](https://github.com/rstacruz) &nbsp;&middot;&nbsp;\n> Twitter [@rstacruz](https://twitter.com/rstacruz)\n\n[MIT]: http://mit-license.org/\n[contributors]: http://github.com/rstacruz/details-polyfill/contributors\n","maintainers":[{"name":"rstacruz","email":"dropbox@ricostacruz.com"}],"time":{"modified":"2022-06-15T01:52:22.873Z","created":"2016-07-27T19:58:59.684Z","1.0.0":"2016-07-27T19:58:59.684Z","1.0.1":"2016-07-27T20:32:06.762Z","1.0.2":"2016-07-29T10:56:08.781Z","1.1.0":"2017-05-28T03:04:47.092Z","1.2.0":"2021-03-16T05:26:38.260Z"},"homepage":"https://github.com/rstacruz/details-polyfill#readme","keywords":["details","summary","html5","polyfill"],"repository":{"type":"git","url":"git+https://github.com/rstacruz/details-polyfill.git"},"author":{"name":"Rico Sta. Cruz","email":"rico@ricostacruz.com"},"bugs":{"url":"https://github.com/rstacruz/details-polyfill/issues"},"license":"MIT","readmeFilename":"README.md"}