OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * @fileoverview The entry point for all ChromeVox2 related code for the |
| 7 * injected content script. |
| 8 * This script will temporarily forward any events we need during the |
| 9 * ChromeVox/ChromeVox2 timeframe where extension APIs do not exist (e.g. |
| 10 * keyboard events). |
| 11 */ |
| 12 |
| 13 /** namespace */ |
| 14 var cvox2 = function() {}; |
| 15 |
| 16 var port = chrome.extension.connect({name: 'chromevox2'}); |
| 17 document.body.addEventListener('keydown', function(evt) { |
| 18 port.postMessage({keydown: evt.keyCode}); |
| 19 }, true); |
OLD | NEW |