This repository was archived by the owner on Mar 13, 2018. It is now read-only.
File tree 1 file changed +4
-12
lines changed
1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 43
43
oldName && this . remove ( oldName ) ;
44
44
newName && this . add ( newName ) ;
45
45
} ;
46
-
47
- // add array() and forEach() to NodeList, NamedNodeMap, HTMLCollection
46
+
47
+ // add array() to NodeList, NamedNodeMap, HTMLCollection
48
48
49
49
var ArraySlice = function ( ) {
50
50
return Array . prototype . slice . call ( this ) ;
51
51
} ;
52
52
53
53
var namedNodeMap = ( window . NamedNodeMap || window . MozNamedAttrMap || { } ) ;
54
-
54
+
55
55
NodeList . prototype . array = ArraySlice ;
56
56
namedNodeMap . prototype . array = ArraySlice ;
57
57
HTMLCollection . prototype . array = ArraySlice ;
58
58
59
- var ArrayForEach = function ( cb , context ) {
60
- ArraySlice . call ( this ) . forEach ( cb , context ) ;
61
- } ;
62
-
63
- NodeList . prototype . forEach = ArrayForEach ;
64
- namedNodeMap . prototype . forEach = ArrayForEach ;
65
- HTMLCollection . prototype . forEach = ArrayForEach ;
66
-
67
59
// polyfill performance.now
68
60
69
61
if ( ! window . performance ) {
104
96
// utility
105
97
106
98
function createDOM ( inTagOrNode , inHTML , inAttrs ) {
107
- var dom = typeof inTagOrNode == 'string' ?
99
+ var dom = typeof inTagOrNode == 'string' ?
108
100
document . createElement ( inTagOrNode ) : inTagOrNode . cloneNode ( true ) ;
109
101
dom . innerHTML = inHTML ;
110
102
if ( inAttrs ) {
You can’t perform that action at this time.
0 commit comments