Permalink
Browse files

Partial fix for issue #4

  • Loading branch information...
1 parent b838129 commit 0d061732c840310b52daa38a76c956fca8d19fe9 Lea Verou committed Jul 3, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 progress-polyfill.js
View
@@ -123,7 +123,7 @@ var self = window.ProgressPolyfill = {
get: function(){
var label = this.parentNode;
- while(label && label.nodeName !== 'LABEL') {
+ while(label && !/^label$/i.test(label.nodeName)) {
label = label.parentNode;
}
@@ -206,15 +206,15 @@ if(document.addEventListener) {
document.addEventListener('DOMAttrModified', function(evt) {
var node = evt.target, attribute = evt.attrName;
- if(node.nodeName === 'PROGRESS' && (attribute === 'max' || attribute === 'value')) {
+ if(/^progress$/i.test(node.nodeName) && (attribute === 'max' || attribute === 'value')) {
self.redraw(node);
}
}, false);
document.addEventListener('DOMNodeInserted', function(evt) {
var node = evt.target;
- if(node.nodeName === 'PROGRESS') {
+ if(/^progress$/i.test(node.nodeName)) {
self.init(node);
}
}, false);

0 comments on commit 0d06173

Please sign in to comment.