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

Commit 906988b

Browse files
committed
fix: IE9 does not include pseudo-element styles
1 parent 88a0fc0 commit 906988b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/browser/client-scripts/polyfills/getComputedStyle.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ CSSStyleDeclaration.prototype = {
109109
};
110110

111111
// <Global>.getComputedStyle
112-
exports.getComputedStyle = function getComputedStyle(element) {
113-
return new CSSStyleDeclaration(element);
112+
exports.getComputedStyle = function getComputedStyle(element, pseudoEl) {
113+
// IE9 needs matchMedia support but already support getComputedStyle
114+
return window.getComputedStyle
115+
? window.getComputedStyle(element, pseudoEl)
116+
: new CSSStyleDeclaration(element);
114117
};

0 commit comments

Comments
 (0)