Details/summary polyfill (expandable/collapsible content)
Questions or comments?
summary elements allows content to be expanded and collapsed. Because some browsers do not support this functionality natively, this polyfill emulates the same functionality using generic HTML and WAI-ARIA.
How to implement
To use the polyfill, standard
summary elements must be used. In cases where a browser doesn't support these elements, the polyfill is automatically loaded.
Configuration options available for the
summary elements (HTML5 specification)
|Event||Trigger||What it does|
|wb-init.wb-details||Triggered manually (e.g.,
||Used to manually initialize the details/summary polyfill on a summary element. Note: The details/summary polyfill will be initialized automatically unless the
||Triggered manually (e.g.,
||Used to manually initialize the details/summary polyfill on a
||Triggered automatically after the details/summary polyfill initializes. Note: This event will only be triggered if the polyfill is loaded. The polyfill will not load for browsers with native details/summary support.||Used to identify where the details/summary polyfill initialized (target of the event)
||Triggered automatically when WET has finished loading and executing.||Used to identify when all WET plugins and polyfills have finished loading and executing.
Details/summary polyfill source code on GitHub
- Date modified: