Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit88690eb

Browse files
authored
Manipulation: Generalize a test to support IE
Refgh-5378Closesgh-5391
1 parente06ff08 commit88690eb

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

‎test/unit/manipulation.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,11 +1826,25 @@ QUnit.test( "html(self-removing script) (gh-5377)", function( assert ) {
18261826

18271827
$fixture.html(
18281828
[
1829-
"<script>document.currentScript.parentNode.removeChild( document.currentScript ); QUnit.assert.ok( true, 'removed document.currentScript' );</script>",
1829+
"<script id='gh5377-1'>",
1830+
"(function removeScript() {",
1831+
"var id = 'gh5377-1';",
1832+
"var script = document.currentScript || document.getElementById(id);",
1833+
"script.parentNode.removeChild( script );",
1834+
"QUnit.assert.ok( true, 'removed document.currentScript' );",
1835+
"})();",
1836+
"</script>",
18301837
"<div>",
1831-
"<script>document.currentScript.parentNode.removeChild( document.currentScript ); QUnit.assert.ok( true, 'removed inner document.currentScript' );</script>",
1838+
"<script id='gh5377-2'>",
1839+
"(function removeInnerScript() {",
1840+
"var id = 'gh5377-2';",
1841+
"var innerScript = document.currentScript || document.getElementById(id);",
1842+
"innerScript.parentNode.removeChild( innerScript );",
1843+
"QUnit.assert.ok( true, 'removed inner document.currentScript' );",
1844+
"})();",
1845+
"</script>",
18321846
"</div>"
1833-
].join("")
1847+
].join("\n")
18341848
);
18351849
});
18361850

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp