summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/remove-iframe-for-designMode.html
blob: 609a9ca5429c6f5d2230e05a8b6db9501348d419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test for bug 612565 of Mozilla</title>
</head>
  <body>
    <iframe></iframe>
  </body>
  <script>
    onload = function() {
      var i = document.querySelector("iframe");
      var doc = i.contentDocument;
      doc.body.appendChild(doc.createTextNode("foo"));
      doc.designMode = "on";
      while (doc.body.firstChild) {
        doc.body.firstChild.remove();
      }
    };
  </script>
</html>