8 'animationend': 'reset',
9 'webkitAnimationEnd': 'reset'
15 * Displays the spinner.
24 reflectToAttribute
: true,
25 observer
: '_activeChanged'
29 * Alternative text content for accessibility support.
30 * If alt is present, it will add an aria-label whose content matches alt when active.
31 * If alt is not present, it will default to 'loading' as the alt value.
40 observer
: '_altChanged'
44 * True when the spinner is going from active to inactive. This is represented by a fade
45 * to 0% opacity to the user.
52 _spinnerContainerClassName
: {
54 computed
: '_computeSpinnerContainerClassName(active, _coolingDown)'
59 _computeSpinnerContainerClassName: function(active
, coolingDown
) {
61 active
|| coolingDown
? 'active' : '',
62 coolingDown
? 'cooldown' : ''
66 _activeChanged: function(active
, old
) {
67 this._setAriaHidden(!active
);
69 this._coolingDown
= true;
73 _altChanged: function(alt
) {
74 // user-provided `aria-label` takes precedence over prototype default
75 if (alt
=== this.getPropertyInfo('alt').value
) {
76 this.alt
= this.getAttribute('aria-label') || alt
;
78 this._setAriaHidden(alt
==='');
79 this.setAttribute('aria-label', alt
);
83 _setAriaHidden: function(hidden
) {
84 var attr
= 'aria-hidden';
86 this.setAttribute(attr
, 'true');
88 this.removeAttribute(attr
);
94 this._coolingDown
= false;