|
|
@@ -53,7 +53,7 @@ export function compile (el, options, partial) {
|
|
|
// link function for the childNodes
|
|
|
var childLinkFn =
|
|
|
!(nodeLinkFn && nodeLinkFn.terminal) &&
|
|
|
- el.tagName !== 'SCRIPT' &&
|
|
|
+ !isScript(el) &&
|
|
|
el.hasChildNodes()
|
|
|
? compileNodeList(el.childNodes, options)
|
|
|
: null
|
|
|
@@ -284,7 +284,7 @@ export function compileRoot (el, options, contextOptions) {
|
|
|
|
|
|
function compileNode (node, options) {
|
|
|
var type = node.nodeType
|
|
|
- if (type === 1 && node.tagName !== 'SCRIPT') {
|
|
|
+ if (type === 1 && !isScript(node)) {
|
|
|
return compileElement(node, options)
|
|
|
} else if (type === 3 && node.data.trim()) {
|
|
|
return compileTextNode(node, options)
|
|
|
@@ -819,3 +819,10 @@ function hasOneTime (tokens) {
|
|
|
if (tokens[i].oneTime) return true
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+function isScript (el) {
|
|
|
+ return el.tagName === 'SCRIPT' && (
|
|
|
+ !el.hasAttribute('type') ||
|
|
|
+ el.getAttribute('type') === 'text/javascript'
|
|
|
+ )
|
|
|
+}
|