-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathunpolyfill.js
34 lines (31 loc) · 1.02 KB
/
unpolyfill.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* Un-polyfills - to be included in karma.conf.js to catch
* browser-dependent errors.
*/
'use strict';
(function(arr) {
arr.forEach(function(item) {
Object.defineProperty(item, 'remove', {
configurable: true,
enumerable: true,
writable: true,
value: function() {
throw Error([
'test/jasmine/assets/unpolyfill.js error: calling ChildNode.remove()',
'which is not available in IE.'
].join(' '));
}
});
Object.defineProperty(item, 'prepend', {
configurable: true,
enumerable: true,
writable: true,
value: function() {
throw Error([
'test/jasmine/assets/unpolyfill.js error: calling ChildNode.prepend()',
'which is not available in IE.'
].join(' '));
}
});
});
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);