Skip to main content

Bug Tracker

Side navigation

Ticket #5327: ie_jquery.html


File ie_jquery.html, 0.8 KB (added by Perceptes, October 06, 2009 03:54AM UTC)

IE HTML5 element insertion test

<!DOCTYPE html>
<html>
<head>
	<meta charset=utf-8>
	<title>ie_jquery</title>	
	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
	<script>
	window.onload = function() {

		var filler = document.getElementById("filler");
		if (filler.childNodes[0].data != "FAIL (script did not run)") {
			document.body.innerHTML = "FAIL (<section> element in source incorrectly parsed)";
		}
		filler.removeChild(filler.firstChild);

		$("#filler").before('<section id="output"></section>');
		try {
			$("#output").append("PASS");
		} catch(e) {
			document.body.innerHTML = "FAIL (jQuery threw on append)";
		}
	}
	</script>
</head>
<body>
	<section id="filler">FAIL (script did not run)</section>
</body>
</html>

Download in other formats:

Original Format