| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 console.log("Switch access is enabled"); | 5 console.log("Switch access is enabled"); |
| 6 |
| 7 console.log(chrome); |
| 8 console.log(chrome.commands); |
| 9 console.log(chrome.commands.onCommand); |
| 10 console.log(chrome.commands.onCommand.addListener); |
| 11 |
| 12 chrome.commands.onCommand.addListener(function(command) { |
| 13 console.log("Start of onCommand listener"); |
| 14 console.log("Triggered command: ", command); |
| 15 console.log("End of onCommand listener"); |
| 16 }); |
| 17 |
| 18 chrome.commands.getAll(function(commands) { |
| 19 console.log(commands); |
| 20 }); |
| 21 |
| 22 console.log("Reached end of code"); |
| OLD | NEW |