Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue #2

  • Loading branch information...
commit 39c73b7861b812c6d101e2141c1a330857135dcd 1 parent d5bdc6b
Lea Verou authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  progress-polyfill.js
  2. +1 −1  progress-polyfill.min.js
View
2  progress-polyfill.js
@@ -33,7 +33,7 @@ if (!defineProperty) {
else {
// Fallback to regular properties if getters/setters are not supported
defineProperty = function(o, property, etters) {
- o[property] = etters.get();
+ o[property] = etters.get.call(o);
},
supportsEtters = false;
}
View
2  progress-polyfill.min.js
@@ -1,4 +1,4 @@
-(function(){if(!("position"in document.createElement("progress"))){var d=Object.defineProperty;d||(d="__defineSetter__"in document.body?function(a,c,b){a.__defineGetter__(c,b.get);b.set&&a.__defineSetter__(c,b.set)}:function(a,b,d){a[b]=d.get()});try{[].slice.apply(document.images);var h=function(a){return[].slice.apply(a)}}catch(i){h=function(a){for(var b=[],d=a.length,e=0;e<d;e++)b[e]=a[e];return b}}for(var f=function(){var a=document.createElement("div");a.foo="bar";return a.getAttribute("foo")===
+(function(){if(!("position"in document.createElement("progress"))){var d=Object.defineProperty;d||(d="__defineSetter__"in document.body?function(a,c,b){a.__defineGetter__(c,b.get);b.set&&a.__defineSetter__(c,b.set)}:function(a,b,d){a[b]=d.get.call(a)});try{[].slice.apply(document.images);var h=function(a){return[].slice.apply(a)}}catch(i){h=function(a){for(var b=[],d=a.length,e=0;e<d;e++)b[e]=a[e];return b}}for(var f=function(){var a=document.createElement("div");a.foo="bar";return a.getAttribute("foo")===
"bar"}(),b=window.ProgressPolyfill={DOMInterface:{max:{get:function(){return parseFloat(this.getAttribute("aria-valuemax"))||1},set:function(a){this.setAttribute("aria-valuemax",a);f||this.setAttribute("max",a);b.redraw(this)}},value:{get:function(){return parseFloat(this.getAttribute("aria-valuenow"))||0},set:function(a){this.setAttribute("aria-valuenow",a);f||this.setAttribute("value",a);b.redraw(this)}},position:{get:function(){return this.hasAttribute("aria-valuenow")?this.value/this.max:-1}},
labels:{get:function(){for(var a=this.parentNode;a&&a.nodeName!=="LABEL";)a=a.parentNode;a=a?[a]:[];if(this.id&&document.querySelectorAll){var b=h(document.querySelectorAll('label[for="'+this.id+'"]'));b.length&&(a=a.concat(b))}return a}}},redraw:function(a){b.isInited(a)?b.init(a):f||(a.setAttribute("aria-valuemax",parseFloat(a.getAttribute("max"))||1),a.hasAttribute("value")?a.setAttribute("aria-valuenow",parseFloat(a.getAttribute("value"))||0):a.removeAttribute("aria-valuenow"));if(a.position!==
-1)a.style.paddingRight=a.offsetWidth*(1-a.position)+"px"},isInited:function(a){return a.getAttribute("role")==="progressbar"},init:function(a){if(!b.isInited(a)){a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");a.setAttribute("aria-valuemax",parseFloat(a.getAttribute("max"))||1);a.hasAttribute("value")&&a.setAttribute("aria-valuenow",parseFloat(a.getAttribute("value"))||0);for(var c in b.DOMInterface)d(a,c,{get:b.DOMInterface[c].get,set:b.DOMInterface[c].set});b.redraw(a)}},
Please sign in to comment.
Something went wrong with that request. Please try again.