var thetr = document.getElementById("thetr");
thetr.outerHTML = "
a
b
"; var thetable = document.getElementById("thetable");
is(thetable.innerHTML, "
1
a
b
3
", "Wrong outerHTML parsing inside table");
variframe = document.getElementsByTagName("iframe")[0]; var oldbody = iframe.contentDocument.body; iframe.contentDocument.body.outerHTML = "";
isnot(oldbody, iframe.contentDocument.body, "Failed to replace body");
is(iframe.contentDocument.getElementsByTagName("body").length, 1, "Should have gotten one body");
// Yes, two heads per spec. Also Ragnarök and Chrome produce two heads.
is(iframe.contentDocument.getElementsByTagName("head").length, 2, "Should have gotten two heads");
try {
document.documentElement.outerHTML = "";
ok(false, "Should have thrown an exception");
} catch(e) {
is(e.name, "NoModificationAllowedError", "outerHTML should throw NoModificationAllowedError");
is(e.code, 7, "outerHTML should throw NO_MODIFICATION_ALLOWED_ERR");
}
var f = document.createDocumentFragment(); vardl = document.createElement("dl"); var p = document.createElement("p"); varol = document.createElement("ol");
f.appendChild(dl);
f.appendChild(p);
f.appendChild(ol);
p.outerHTML = "
"; var fragmentwrap = document.getElementById("fragmentwrap");
fragmentwrap.appendChild(f);
is(fragmentwrap.innerHTML, "
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.