Using browserify, just require it
require('details-summary')
Works using event delegation which means the details/summary elements do not have to be present at page load. Dynamically added details/summary elements will also work. Adds aria-expanded/aria-hidden accessibility attributes.