File: event_capture.html

package info (click to toggle)
vimium 2.1.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,212 kB
  • sloc: javascript: 12,766; makefile: 7
file content (29 lines) | stat: -rw-r--r-- 620 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!--
  This is a test harness to determine whether a page can install event listeners before Vimium's
  content scripts can.
-->
<!DOCTYPE html>
<html>

<head>
  <title>Event capture</title>
  <link rel="icon" href="data:;base64,iVBORw0KGgo=">
  <script>
    window.addEventListener("keydown", (event) => {
      console.log("Page's received keydown. Vimium in normal mode should not allow this.");
      event.preventDefault();
      event.stopPropagation();
    }, true);
  </script>
  <style type="text/css" media="screen">
    body {
      background-color: black;
    }
  </style>
</head>

<body>

</body>

</html>