blob: 34ad747977c9f5a9c12e42e4532cad7bda510386 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<body>
<script>
test(t => {
let portal = document.createElement("portal");
xmlDoc = document.implementation.createDocument("", null);
xmlDoc.appendChild(portal);
}, "inserting a portal element into an XML document shouldn't crash or throw");
test(t => {
let iframe = document.createElement("iframe");
document.body.appendChild(iframe);
var doc = iframe.contentDocument;
iframe.remove();
let portal = document.createElement("portal");
doc.body.appendChild(portal);
}, "inserting a portal element into a detached iframe's document shouldn't crash or throw");
</script>
</body>