4 textarea { visibility: hidden; }
5 button:optional, textarea:optional { display: block; }
6 div:first-letter { color: red; }
7 form:read-only { visibility: inherit; }
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var aoScriptElements
= document
.getElementsByTagName("script");
14 for(var i
= 0; i
< aoScriptElements
.length
; i
++) {
15 aoScriptElements
[i
].parentNode
.removeChild(aoScriptElements
[i
]);
18 function event_DOMNodeRemoved() {
19 var oSelection
= window
.getSelection();
20 var oRange
= oSelection
.getRangeAt(47 % oSelection
.rangeCount
);
21 oSelection
.addRange(oRange
.cloneRange());
24 document
.addEventListener("DOMNodeRemoved", event_DOMNodeRemoved
, true);
27 function event_DOMNodeInserted() {
28 var aoElements
= document
.getElementsByTagName("*");
29 var oSelection
=window
.getSelection();
34 var oElement
= event
.srcElement
;
35 document
.execCommand('FindString', false, 'Blarg');
36 oElement
.outerHTML
= "";
38 oSelection
.getRangeAt(0).insertNode(aoElements
[14 % aoElements
.length
]);
40 oSelection
.deleteFromDocument();
43 document
.addEventListener("DOMNodeInserted", event_DOMNodeInserted
, true);
45 window
.onload = function() {
46 var oSelection
= window
.getSelection();
47 document
.execCommand("SelectAll", false, false)
48 oSelection
.collapseToStart();
50 oSelection
.getRangeAt(0).insertNode(document
.getElementById('foreignobject'));
52 var oElement
= document
.getElementById('rtc');
53 oElement
.insertAdjacentHTML('beforeend', '<b></b><b></b>');
54 oElement
.textContent
= "text";
56 oSelection
.getRangeAt(0).insertNode(document
.getElementById('button'));
57 oSelection
.getRangeAt(0).insertNode(document
.createElement('b'));
65 <foreignObject id='foreignobject'
></foreignObject>
73 <textarea>AxBxC
</textarea>
84 Test passes if it does not CRASH.