Skip to content

Commit e5c86bd

Browse files
committed
delete rouge polyfill
1 parent 4260eaa commit e5c86bd

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/polyfills.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,6 @@ function applyPolyfills() {
1717
}
1818
})(Element);
1919

20-
// Overwrites native 'firstElementChild' prototype.
21-
// Adds Document & DocumentFragment support for IE9 & Safari.
22-
// Returns array instead of HTMLCollection.
23-
(function (constructor: any) {
24-
if (
25-
constructor &&
26-
constructor.prototype &&
27-
!constructor.prototype.hasOwnProperty('firstElementChild')
28-
) {
29-
Object.defineProperty(constructor.prototype, "firstElementChild", {
30-
get: function () {
31-
console.log('hitting this!');
32-
if(this !== constructor.prototype) {
33-
var node, nodes = this.childNodes, i = 0;
34-
while ((node = nodes[i++])) {
35-
if (node.nodeType === 1) {
36-
return node;
37-
}
38-
}
39-
}
40-
return null;
41-
}
42-
});
43-
}
44-
})(Node || Element);
45-
4620
// Production steps of ECMA-262, Edition 5, 15.4.4.17
4721
// Reference: http://es5.github.io/#x15.4.4.17
4822
if (!Array.prototype.some) {

0 commit comments

Comments
 (0)