mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
37 lines
880 B
HTML
37 lines
880 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset=utf-8 />
|
|
<title>body</title>
|
|
</head>
|
|
<body>
|
|
<div id="qunit-fixture"></div>
|
|
<script src="../../jquery.js"></script>
|
|
<script>
|
|
var script = document.getElementsByTagName( "script" )[ 0 ],
|
|
div = document.createElement( "div" ),
|
|
src = "http://" + window.parent.externalHost,
|
|
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>
|