fune/dom/browser-element/mochitest/file_focus.html
Jagmeet Bhamber e15a06b5ac Bug 1508823 - Enable ESLint for dom/browser-element (manual changes). r=mccr8
Depends on D21215

Differential Revision: https://phabricator.services.mozilla.com/D14130

--HG--
extra : moz-landing-system : lando
2019-03-19 20:56:24 +00:00

24 lines
557 B
HTML

<html>
<body>
Aloha! My URL is <span id='url'></span>.
<script>
// eslint-disable-next-line no-unsanitized/property
document.getElementById("url").innerHTML = window.location;
</script>
<script>
// The input element is getting synthesized key events and will prevent
// default on the first ESC keydown event.
var alreadyBlocked = false;
addEventListener("keydown", function(e) {
if (e.keyCode == KeyboardEvent.DOM_VK_ESCAPE && !alreadyBlocked) {
alreadyBlocked = true;
e.preventDefault();
}
});
</script>
</body>
</html>