Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
fix: IE9 does not include pseudo-element styles
Browse files Browse the repository at this point in the history
  • Loading branch information
sipayRT committed Nov 22, 2016
1 parent 88a0fc0 commit 906988b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/browser/client-scripts/polyfills/getComputedStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ CSSStyleDeclaration.prototype = {
};

// <Global>.getComputedStyle
exports.getComputedStyle = function getComputedStyle(element) {
return new CSSStyleDeclaration(element);
exports.getComputedStyle = function getComputedStyle(element, pseudoEl) {
// IE9 needs matchMedia support but already support getComputedStyle
return window.getComputedStyle
? window.getComputedStyle(element, pseudoEl)
: new CSSStyleDeclaration(element);
};

0 comments on commit 906988b

Please sign in to comment.