-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #202 #203
base: master
Are you sure you want to change the base?
fix #202 #203
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,17 +201,20 @@ | |
return createElement(nodeName, ownerDocument, data); | ||
}; | ||
|
||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + | ||
'var n=f.cloneNode(),c=n.createElement;' + | ||
'h.shivMethods&&(' + | ||
// unroll the `createElement` calls | ||
getElements().join().replace(/[\w\-:]+/g, function(nodeName) { | ||
data.createElem(nodeName); | ||
data.frag.createElement(nodeName); | ||
return 'c("' + nodeName + '")'; | ||
}) + | ||
');return n}' | ||
)(html5, data.frag); | ||
ownerDocument.createDocumentFragment = function(h,f){ | ||
return function(){ | ||
var n=f.cloneNode(),c=n.createElement; | ||
h.shivMethods&&( | ||
// unroll the `createElement` calls | ||
getElements().join().replace(/[\w\-:]+/g, function(nodeName) { | ||
data.createElem(nodeName); | ||
data.frag.createElement(nodeName); | ||
return c("' + nodeName + '"); | ||
}) | ||
); | ||
return n; | ||
}; | ||
}(html5, data.frag); | ||
Comment on lines
-204
to
+217
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no caching or memoization as in the previous and current versions of the function. |
||
} | ||
|
||
/*--------------------------------------------------------------------------*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,17 +201,20 @@ | |
return createElement(nodeName, ownerDocument, data); | ||
}; | ||
|
||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + | ||
'var n=f.cloneNode(),c=n.createElement;' + | ||
'h.shivMethods&&(' + | ||
// unroll the `createElement` calls | ||
getElements().join().replace(/[\w\-:]+/g, function(nodeName) { | ||
data.createElem(nodeName); | ||
data.frag.createElement(nodeName); | ||
return 'c("' + nodeName + '")'; | ||
}) + | ||
');return n}' | ||
)(html5, data.frag); | ||
ownerDocument.createDocumentFragment = function(h,f){ | ||
return function(){ | ||
var n=f.cloneNode(),c=n.createElement; | ||
h.shivMethods&&( | ||
// unroll the `createElement` calls | ||
getElements().join().replace(/[\w\-:]+/g, function(nodeName) { | ||
data.createElem(nodeName); | ||
data.frag.createElement(nodeName); | ||
return c("' + nodeName + '"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This calls |
||
}) | ||
); | ||
return n; | ||
}; | ||
}(html5, data.frag); | ||
Comment on lines
-204
to
+217
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no caching or memoization as in the previous and current versions of the function. |
||
} | ||
|
||
/*--------------------------------------------------------------------------*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This calls
c()
with the literal argument' + nodeName + '
instead of the contents of the nodeName variable.