From 04097d2049bba7a498821443a392e3ff4b67dcda Mon Sep 17 00:00:00 2001 From: simonkcleung Date: Sat, 23 Nov 2013 23:45:28 +0800 Subject: [PATCH 1/3] Update prefixfree.dynamic-dom.js Fix to https://github.com/LeaVerou/prefixfree/issues/120 --- plugins/prefixfree.dynamic-dom.js | 83 +++++++++++++++++-------------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/plugins/prefixfree.dynamic-dom.js b/plugins/prefixfree.dynamic-dom.js index 0b25056..0b08ce3 100755 --- a/plugins/prefixfree.dynamic-dom.js +++ b/plugins/prefixfree.dynamic-dom.js @@ -51,46 +51,53 @@ if(!self) { } // Add accessors for CSSOM property changes -if(window.CSSStyleDeclaration) { - for(var i=0; i Date: Sun, 24 Nov 2013 12:04:20 +0800 Subject: [PATCH 2/3] Update prefixfree.dynamic-dom.js --- plugins/prefixfree.dynamic-dom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/prefixfree.dynamic-dom.js b/plugins/prefixfree.dynamic-dom.js index 0b08ce3..e52ce8e 100755 --- a/plugins/prefixfree.dynamic-dom.js +++ b/plugins/prefixfree.dynamic-dom.js @@ -95,8 +95,8 @@ if (Object.defineProperty) { configurable: true }); } else if(proto.__defineGetter__) { - proto.__defineGetter__(property, getter(property)); - proto.__defineSetter__(property, setter(property)); + proto.__defineGetter__(unprefixed, getter(property)); + proto.__defineSetter__(unprefixed, setter(property)); } }; From 4c5c9ac10ad4d88ec6190df03439dd9851abddcf Mon Sep 17 00:00:00 2001 From: simonkcleung Date: Sun, 24 Nov 2013 12:11:38 +0800 Subject: [PATCH 3/3] Update prefixfree.dynamic-dom.js --- plugins/prefixfree.dynamic-dom.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/prefixfree.dynamic-dom.js b/plugins/prefixfree.dynamic-dom.js index e52ce8e..67ebe81 100755 --- a/plugins/prefixfree.dynamic-dom.js +++ b/plugins/prefixfree.dynamic-dom.js @@ -67,14 +67,6 @@ var i=0, unprefixed="", match; -while (i < properties.length){ - property = properties[i++]; - match = property.match(prefixRE); - -if (!match || style.hasOwnProperty(unprefixed = match[1].toLowerCase() + match[2])){ - continue; -} - var getter = function(property){ return function(){ return this[property]; @@ -87,6 +79,15 @@ var setter = function(property){ } } +while (i < properties.length){ + property = properties[i++]; + match = property.match(prefixRE); + +if (!match || style.hasOwnProperty(unprefixed = match[1].toLowerCase() + match[2])){ + continue; +} + + if (Object.defineProperty) { Object.defineProperty(proto, unprefixed, { get: getter(property),