content/xul/content/crashtests/336096-1.xhtml
author David Mandelin <dmandelin@mozilla.com>
Mon, 09 Aug 2010 18:29:34 -0700
changeset 53358 688ca6c81137c6972b5a7f172394c7b4d332e93d
parent 9114 7e9b763d62615444d96c4130a1ec405a889f5aa6
child 219873 afcb3af79d09513b2772c629c23a0d9f7b7437b4
permissions -rw-r--r--
[JAEGER] Bug 585801 trial fix: innerize object passed as scope chain for JS evaluation

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
<![CDATA[

function init()
{
    var targetWindow = window.frames[0];
    var targetDocument = targetWindow.document;
    
    targetDocument.body.appendChild(document.getElementById('rootish'));
    targetDocument.designMode = 'on';

    var r = targetDocument.createRange(); 
    r.setStart(targetDocument.getElementById("start"), 0); 
    r.setEnd  (targetDocument.getElementById("end"), 0); 
    targetWindow.getSelection().addRange(r);

    targetDocument.execCommand('bold', false, null);
}

]]>
</script>
</head>

<body onload="setTimeout(init, 200);">

<iframe src="data:text/html," style="width: 95%; height: 500px;"></iframe>

<div id="rootish">
  <div id="start"></div>
  <hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <hbox/>
    <vbox id="end">
      <hbox/>
    </vbox>
  </hbox>
</div>

</body>
</html>