Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /focus/synthetic-focus-event-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="assert" href="Synthetic focus events sent to form controls should not cause a crash">
<input id="input">
<textarea id="textarea"></textarea>
<script>
let event = document.createEvent("FocusEvent");
event.initEvent('', true);
input.dispatchEvent(event);
let event2 = document.createEvent("FocusEvent");
event2.initEvent('', true);
textarea.dispatchEvent(event2);
</script>