mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Manipulation: Generalize a test to support IE
Ref gh-5378
Closes gh-5391
(cherry picked from commit 88690ebfc8
)
This commit is contained in:
parent
69c77cea07
commit
ab0444dd64
@ -1878,11 +1878,25 @@ QUnit.test( "html(self-removing script) (gh-5377)", function( assert ) {
|
||||
|
||||
$fixture.html(
|
||||
[
|
||||
"<script>document.currentScript.parentNode.removeChild( document.currentScript ); QUnit.assert.ok( true, 'removed document.currentScript' );</script>",
|
||||
"<script id='gh5377-1'>",
|
||||
"(function removeScript() {",
|
||||
"var id = 'gh5377-1';",
|
||||
"var script = document.currentScript || document.getElementById(id);",
|
||||
"script.parentNode.removeChild( script );",
|
||||
"QUnit.assert.ok( true, 'removed document.currentScript' );",
|
||||
"})();",
|
||||
"</script>",
|
||||
"<div>",
|
||||
"<script>document.currentScript.parentNode.removeChild( document.currentScript ); QUnit.assert.ok( true, 'removed inner document.currentScript' );</script>",
|
||||
"<script id='gh5377-2'>",
|
||||
"(function removeInnerScript() {",
|
||||
"var id = 'gh5377-2';",
|
||||
"var innerScript = document.currentScript || document.getElementById(id);",
|
||||
"innerScript.parentNode.removeChild( innerScript );",
|
||||
"QUnit.assert.ok( true, 'removed inner document.currentScript' );",
|
||||
"})();",
|
||||
"</script>",
|
||||
"</div>"
|
||||
].join( "" )
|
||||
].join( "\n" )
|
||||
);
|
||||
} );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user