Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<!DOCTYPE html>
<meta charset="utf-8">
<title>Focus related events should fire in the correct order</title>
<link rel="author" title="Mu-An Chiou" href="">
<link rel="help" href="">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<button type="button" id="fromEl">Focus managemnt from button</button>
<button type="button" id="toEl">To button</button>
setup({single_test: true});
onload = function() {
const from = document.getElementById("fromEl")
const to = document.getElementById("toEl")
from.addEventListener("keydown", event => {
to.addEventListener("click", event => {console.log(event); assert_unreached();});
let actions = new test_driver.Actions()
.keyDown(" ")
.keyUp(" ").send().then(() => setTimeout(done, 100));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment