| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 | |
| 3 <head> | |
| 4 | |
| 5 <script> | |
| 6 | |
| 7 function test() | |
| 8 { | |
| 9 if (window.testRunner) | |
| 10 testRunner.dumpAsText(); | |
| 11 | |
| 12 document.getElementById('select').length; // cause the <select> element to b
uild a list of options | |
| 13 document.getElementById('group').innerHTML = ""; // remove an option using i
nnerHTML | |
| 14 document.getElementById('select').length; // cause the <select> element to u
se the list of options | |
| 15 document.getElementById('select').innerHTML = ""; // remove the other option
using innerHTML | |
| 16 document.getElementById('select').length; // cause the <select> element to u
se the list of options | |
| 17 | |
| 18 document.getElementById('result').innerHTML = "PASSED"; | |
| 19 } | |
| 20 | |
| 21 </script> | |
| 22 | |
| 23 </head> | |
| 24 | |
| 25 </html> | |
| 26 | |
| 27 <body onload="test()"> | |
| 28 | |
| 29 <p>This tests a case where removing an option element from a select by using inn
erHTML would cause a crash.</p> | |
| 30 | |
| 31 <p id="result">TEST NOT RUN</p> | |
| 32 | |
| 33 <select id="select"> | |
| 34 <option>here is one</option> | |
| 35 <optgroup id="group" label="group"><option>here is another</option></optgroup
> | |
| 36 </select> | |
| 37 | |
| 38 </body> | |
| 39 | |
| 40 </html> | |
| OLD | NEW |