tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

keypress-dispatch-crash.html (565B)


      1 <!DOCTYPE html>
      2 <link rel="author" title="Robert Flack" href="mailto:flackr@chromium.org">
      3 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1209098">
      4 
      5 <!-- No crash should occur if a keypress is dispatched to a constructed document. -->
      6 
      7 <script>
      8 var newDoc = document.implementation.createDocument( "", null);
      9 var testNode = newDoc.createElement('div');
     10 newDoc.append(testNode);
     11 
     12 var syntheticEvent = document.createEvent('KeyboardEvents');
     13 syntheticEvent.initKeyboardEvent("keypress");
     14 testNode.dispatchEvent(syntheticEvent)
     15 </script>