Skip to content

Commit 0cc7fc3

Browse files
committed
fix: Adding flag support for Microsoft Edge, Low performance but at least it
works now 💩
1 parent b613549 commit 0cc7fc3

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

Slim.es6.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Slim.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,22 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
2828

2929
var __flags = {
3030
isWCSupported: 'customElements' in window && 'import' in document.createElement('link') && 'content' in document.createElement('template'),
31-
isIE11: !!window['MSInputMethodContext'] && !!document['documentMode']
31+
isIE11: !!window['MSInputMethodContext'] && !!document['documentMode'],
32+
isChrome: undefined,
33+
isEdge: undefined
3234
};
3335

3436
try {
3537
__flags.isChrome = /Chrome/.test(navigator.userAgent);
36-
} catch (err) {
37-
__flags.isChrome = false;
38-
}
38+
__flags.isEdge = /Edge/.test(navigator.userAgent);
39+
40+
if (__flags.isIE11 || __flags.isEdge) {
41+
__flags.isChrome = false;
42+
Object.defineProperty(Node.prototype, 'children', function () {
43+
return this.childNodes;
44+
});
45+
}
46+
} catch (err) {}
3947

4048
var _$2 = '_slim_internals_'; //Symbol('Slim')
4149

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy