aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation.js
diff options
context:
space:
mode:
authorbasil.belokon <basil.belokon@gmail.com>2017-12-03 15:58:09 +0600
committerTimmy Willison <4timmywil@gmail.com>2018-01-16 11:39:16 -0500
commit5d3a968e031ab8dff5c07e1d6bb4f196fb82bfa0 (patch)
tree8cb0c8082469f637c38ca90b5dc4c60b9c54f57f /src/manipulation.js
parent428ee4a62488457a1bc568e7475cbf65b1feaf93 (diff)
downloadjquery-5d3a968e031ab8dff5c07e1d6bb4f196fb82bfa0.tar.gz
jquery-5d3a968e031ab8dff5c07e1d6bb4f196fb82bfa0.zip
Manipulation: Add support for scripts with module type
Fixes gh-3871 Close gh-3869
Diffstat (limited to 'src/manipulation.js')
-rw-r--r--src/manipulation.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index ae713fe29..142e296ad 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -194,14 +194,14 @@ function domManip( collection, args, callback, ignored ) {
!dataPriv.access( node, "globalEval" ) &&
jQuery.contains( doc, node ) ) {
- if ( node.src ) {
+ if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {
// Optional AJAX dependency, but won't run scripts if not present
if ( jQuery._evalUrl ) {
jQuery._evalUrl( node.src );
}
} else {
- DOMEval( node.textContent.replace( rcleanScript, "" ), doc );
+ DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node );
}
}
}