I’m curious what “should” happen in the example below. Most current browsers (Firefox 5, Chrome 14, Opera 11.50) will add the iframe above the text but is it a standardised behaviour or just a common way of doing things that could change in the future?
<!doctype html>
<html>
<head>
<title>Will the iframe be above or below the text?</title>
</head>
<body>
<script>
var e = document.createElement("iframe");
document.body.appendChild(e);
</script>
<p>some text</p>
</body>
</html>
This is standardised behaviour.
When script runs there are yet no children in body.