Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<script>
let code = "x".charCodeAt(0);
let e = new KeyboardEvent("keypress", {
keyCode: code,
charCode: code,
bubbles: true
});
let utils = SpecialPowers.getDOMWindowUtils(window);
utils.dispatchDOMEventViaPresShellForTesting(document.documentElement, e);
</script>