Progress polyfill (progress bar)
Purpose
The HTML5 progress element displays the progress of a task. Because some browsers do not support this functionality natively, this polyfill emulates the same functionality using generic HTML and WAI-ARIA.
Use when
- Displaying the progress of a task
Working example
Task in progress
<progress value="25" max="100" />Completed task
<progress value="50" max="50" />Task of indeterminate progress
<progress /><progress max="50" />How to implement
To use the polyfill, a standard progress element must be used. In cases where a browser doesn't support the progress element, the polyfill is automatically loaded.
Configuration options
Configuration options available for the progress element (HTML5 specification)
Events
| Event | Trigger | What it does | 
|---|---|---|
| wb-init.wb-progress | Triggered manually (e.g., $( "progress" ).trigger( "wb-init.wb-progress" );). | Used to manually initialize the progresspolyfill. Note: Theprogresspolyfill will be initialized automatically unless theprogresselement is added after the page has already loaded. | 
| wb-update.wb-progress | Triggered manually (e.g., $( "progress" ).trigger( "wb-update.wb-progress" );). | Used to manually update the progresspolyfill. | 
| wb-ready.wb-progress(v4.0.5+) | Triggered automatically after the progresspolyfill initializes. Note: This event will only be triggered if the polyfill is loaded. The polyfill will not load for browsers with nativeprogresssupport. | Used to identify where the progresspolyfill initialized (target of the event) | 
| wb-updated.wb-progress(v4.0.5+) | Triggered automatically after the progresspolyfill is updated. Note: This event will only be triggered if the polyfill is loaded. The polyfill will not load for browsers with nativeprogresssupport. | Used to identify where the progresspolyfill initialized (target of the event) | 
| wb-ready.wb(v4.0.5+) | Triggered automatically when WET has finished loading and executing. | Used to identify when all WET plugins and polyfills have finished loading and executing.  | 
Source code
Report a problem on this page
- Date modified: