Home | History | Annotate | Download | only in chromium
      1 <html>
      2 <head>
      3     <script type="text/javascript"> 
      4 
      5     function addEvent(obj, evType, fn) {
      6         if (obj.addEventListener){
      7           obj.addEventListener(evType, fn, false);
      8           return true;
      9         } else if (obj.attachEvent){
     10           var r = obj.attachEvent("on"+evType, fn);
     11           return r;
     12         } else {
     13           return false;
     14         }
     15     }
     16 
     17     function reloadSelect() {
     18         var container = document.getElementById('container');
     19         container.innerHTML = '<select id="menu"> \
     20           <option value="abcd">abcd</option>\
     21           <option value="defg">efgh</option>\
     22         </select>';
     23 
     24         var menu = document.getElementById('menu');
     25         addEvent(menu, 'change', reloadSelect);
     26     }
     27 
     28     </script>
     29 </head>
     30 <body>
     31     <p>Do the following and see if Chromium crashes.</p>
     32     <ul>
     33       <li>Click the select</li> 
     34       <li>Press 'e' on your keyboard</li> 
     35       <li>Click on the document but not the select itself.</li>
     36     </ul>
     37 
     38     <div id="container"/>
     39     <script>
     40         reloadSelect()
     41     </script>
     42     </div> 
     43 </body>
     44 </html>
     45