<!DOCTYPE html> | |
<script src="../../resources/testharness.js"></script> | |
<script src="../../resources/testharnessreport.js"></script> | |
<iframe></iframe> | |
<script> | |
window.onload = () => { | |
test(() => { | |
let iframe = document.querySelector('iframe'); | |
let selection = iframe.contentWindow.getSelection(); | |
iframe.remove(); | |
selection.extend(document.body); | |
}, 'Selection.extend() in a detached Window should not crash'); | |
}; | |
</script> |