xref: /third_party/node/test/fixtures/wpt/dom/events/keypress-dispatch-crash.html
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/wpt/dom/events/
11cb0ef41Sopenharmony_ci<!DOCTYPE html>
21cb0ef41Sopenharmony_ci<link rel="author" title="Robert Flack" href="mailto:flackr@chromium.org">
31cb0ef41Sopenharmony_ci<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1209098">
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci<!-- No crash should occur if a keypress is dispatched to a constructed document. -->
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci<script>
81cb0ef41Sopenharmony_civar newDoc = document.implementation.createDocument( "", null);
91cb0ef41Sopenharmony_civar testNode = newDoc.createElement('div');
101cb0ef41Sopenharmony_cinewDoc.append(testNode);
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_civar syntheticEvent = document.createEvent('KeyboardEvents');
131cb0ef41Sopenharmony_cisyntheticEvent.initKeyboardEvent("keypress");
141cb0ef41Sopenharmony_citestNode.dispatchEvent(syntheticEvent)
151cb0ef41Sopenharmony_ci</script>
16

Indexes created Thu Nov 07 10:32:03 CST 2024