Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix #12266. IE9/10 says document[0] is document.frames[0]? Close gh-903.
- Loading branch information
1 parent
ae1d2b3
commit 10901f7d9fa6be01cc6b88cd94d279760b42a069
Showing
3 changed files
with
46 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset=utf-8 /> | ||
<title>body</title> | ||
</head> | ||
<body> | ||
<div id="qunit-fixture"></div> | ||
<script src="../../../dist/jquery.js"></script> | ||
<script> | ||
var script = document.getElementsByTagName( "script" )[ 0 ], | ||
div = document.createElement( "div" ), | ||
src = "http://google.com", | ||
success = true, | ||
error = ""; | ||
|
||
script.parentNode.appendChild( div ); | ||
div.innerHTML = "<iframe name=\"test\" src=\"" + src + "\">"; | ||
|
||
jQuery(function() { | ||
try { | ||
jQuery( "<div>hello<div>world</div>!</div>" ).appendTo( "#qunit-fixture" ); | ||
} catch( e ) { | ||
success = false; | ||
error = e; | ||
} | ||
|
||
window.parent.iframeCallback({ | ||
status: success, | ||
description: "buildFragment sets the context without throwing an exception" + | ||
( error ? ": " + error : "" ) | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters