Skip to content

Commit 58f4d93

Browse files
authored
Merge pull request code-dot-org#24837 from code-dot-org/edge-xpath
Polyfill document.evaluate for IE11
2 parents 99c066e + 4db9076 commit 58f4d93

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

apps/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@
227227
"react-dom-confetti": "^0.0.8",
228228
"react-hot-loader": "^1.3.1",
229229
"selectize": "^0.12.4",
230+
"wgxpath": "^1.2.0",
230231
"whatwg-fetch": "^2.0.3"
231232
}
232233
}

apps/src/polyfills.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* "Pointer Events Polyfill" to support pointer events on Safari
33
*/
44
import 'pepjs';
5+
import wickedGoodXpath from 'wgxpath';
56

67
/**
78
* A low-performance polyfill for toBlob based on toDataURL. Adapted from:
@@ -32,3 +33,10 @@ if (SVGElement.prototype.getElementsByClassName === undefined) {
3233
return this.querySelectorAll('.' + className);
3334
};
3435
}
36+
37+
/**
38+
* Polyfill for document.evaluate for IE
39+
*/
40+
if (!document.evaluate) {
41+
wickedGoodXpath.install(window);
42+
}

apps/yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12242,6 +12242,10 @@ websocket-extensions@>=0.1.1:
1224212242
version "0.1.1"
1224312243
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7"
1224412244

12245+
wgxpath@^1.2.0:
12246+
version "1.2.0"
12247+
resolved "https://registry.yarnpkg.com/wgxpath/-/wgxpath-1.2.0.tgz#a33e4e0f86e68e074d95d50a6e533d64938f432a"
12248+
1224512249
whatwg-fetch@>=0.10.0, whatwg-fetch@^2.0.4:
1224612250
version "2.0.4"
1224712251
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"

dashboard/test/ui/features/spritelab/spritelab.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@no_ie
21
Feature: Sprite Lab
32

43
Background:

0 commit comments

Comments
 (0)