6 'animationend': 'reset',
7 'webkitAnimationEnd': 'reset'
13 * Displays the spinner.
22 reflectToAttribute: true,
23 observer: '_activeChanged'
27 * Alternative text content for accessibility support.
28 * If alt is present, it will add an aria-label whose content matches alt when active.
29 * If alt is not present, it will default to 'loading' as the alt value.
38 observer: '_altChanged'
42 * True when the spinner is going from active to inactive. This is represented by a fade
43 * to 0% opacity to the user.
50 _spinnerContainerClassName: {
52 computed: '_computeSpinnerContainerClassName(active, _coolingDown)'
57 _computeSpinnerContainerClassName: function(active, coolingDown) {
59 active || coolingDown ? 'active' : '',
60 coolingDown ? 'cooldown' : ''
64 _activeChanged: function(active, old) {
65 this._setAriaHidden(!active);
67 this._coolingDown = true;
71 _altChanged: function(alt) {
72 // user-provided `aria-label` takes precedence over prototype default
73 if (alt === this.getPropertyInfo('alt').value) {
74 this.alt = this.getAttribute('aria-label') || alt;
76 this._setAriaHidden(alt==='');
77 this.setAttribute('aria-label', alt);
81 _setAriaHidden: function(hidden) {
82 var attr = 'aria-hidden';
84 this.setAttribute(attr, 'true');
86 this.removeAttribute(attr);
92 this._coolingDown = false;