We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a86dd14 commit a3d3017Copy full SHA for a3d3017
src/utils.js
@@ -166,6 +166,11 @@ var utils = module.exports = {
166
if (template.charAt(0) === '#') {
167
var templateNode = document.getElementById(template.slice(1))
168
if (!templateNode) return
169
+ // if its a template tag and the browser supports it,
170
+ // its content is already a document fragment!
171
+ if (templateNode.tagName === 'TEMPLATE' && templateNode.content) {
172
+ return templateNode.content
173
+ }
174
template = templateNode.innerHTML
175
}
176
var node = document.createElement('div'),
0 commit comments