summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/selectall-in-head-editing-host-after-body-removed.html
blob: 786ea25d9ae86e18fa05cec93fc2d2848e4fd543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<html><head><script type="text/javascript">

function boom()
{
  var dE = document.documentElement;
  var head = document.getElementsByTagName("head")[0];
  dE.removeChild(document.body);
  dE.contentEditable = "true";
  dE.focus();
  dE.contentEditable = "false";
  head.focus();
  head.contentEditable = "true";
  try {
    document.execCommand("selectAll", false, "");
  } catch(e) {
  }
}

</script></head><body onload="boom();"></body></html>