1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45

content / test / data / frame_tree / top.html [blame]

<html>
<head>
<script>
  function simulateClick(target) {
    var evt = document.createEvent("MouseEvents");
    evt.initMouseEvent("click", true, true, window,
                       0, 0, 0, 0, 0, false, false,
                       false, false, 0, null);

    return target.dispatchEvent(evt);
  }

  function openWindow(url) {
    window.open(url);
    return true;
  }

  function removeFrame() {
    var frame = document.getElementById('1-2-id');
    frame.parentNode.removeChild(frame);
    return true;
  }
  
  function addFrame() {
    var frame = document.createElement('iframe');
    frame.setAttribute('src', '1-2.html');
    document.body.appendChild(frame);
    return true;
  }
</script>
</head>
<body>

Top frame.
<br>
<iframe src="1-1.html" id="1-1-id" name="1-1-name"></iframe>
<br>
<iframe src="1-2.html" id="1-2-id" name="1-2-name"></iframe>
<br>
<iframe src="1-3.html" id="1-3-id"></iframe>
<br>

</html>
</body>
</html>