Skip to content

Commit

Permalink
Patch IE9 and below.
Browse files Browse the repository at this point in the history
  • Loading branch information
nobuti authored and A committed Nov 30, 2015
1 parent eec5cbe commit 8f353f1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Patch IE9 and below
try {
document.createElement('DIV').style.setProperty('opacity', 0, '');
} catch (error) {
CSSStyleDeclaration.prototype.getProperty = function(a) {
return this.getAttribute(a);
};

CSSStyleDeclaration.prototype.setProperty = function(a,b) {
return this.setAttribute(a, b + '');
};

CSSStyleDeclaration.prototype.removeProperty = function(a) {
return this.removeAttribute(a);
};
}

/**
* Module Dependencies.
*/
Expand All @@ -16,6 +33,7 @@ var translate = has3d
? ['translate3d(', ', 0)']
: ['translate(', ')'];


/**
* Export `Move`
*/
Expand Down

0 comments on commit 8f353f1

Please sign in to comment.