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 goog.provide('cvox2.Injected'); | |
14 | |
15 var port = chrome.extension.connect({name: 'chromevox2'}); | |
16 document.body.addEventListener('keydown', function(evt) { | |
17 port.postMessage({keydown: evt.keyCode}); | |
18 }, true); | |
OLD | NEW |