Correctif « meter » (compteur)
Vous cherchez la BOEW v3.1?
La BOEW v4.0 est maintenant la version courrante. La version de la page actuelle pour la BOEW v3.1 a été déplacée.
But
L'élément meter de HTML5 affiche une mesure scalaire dans une gamme connue. Étant donné que certains navigateurs ne prennent pas en charge cette fonctionnalité à l'origine, ce correctif émule la même fonctionnalité en utilisant HTML générique et WAI-ARIA.
Needs translation
Use when
- Displaying a scalar measurement within a known range
Do not use when
- Displaying the progress of a task
Working example
Normal
<meter min="20" value="65" max="80">75% (normal)</meter>
Too high
<meter min="0" value="90" max="100" high="80">90% (too high)</meter>
Too low
<meter min="100" low="120" value="115" max="200" high="180">15% (too low)</meter>
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 meter
element (HTML5 specification)
Events
Event | Trigger | What it does |
---|---|---|
wb-init.wb-meter | Triggered manually (e.g., $elm.trigger( "wb-init.wb.wb-meter" ); ). | Used to manually initialize the meter polyfill. Note: The meter polyfill will be initialized automatically unless the meter element is added after the page has already loaded. |
Source code
Ù- Date de modification :