OLD | NEW |
1 <script> | 1 <!-- |
2 | 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this |
3 var devtoolsTabEvents = undefined; | 3 * source code is governed by a BSD-style license that can be found in the |
4 | 4 * LICENSE file. |
5 function pageEventListener() { | 5 --> |
6 receivedEvents.push("onPageEvent"); | 6 <script src="background_two.js"></script> |
7 } | |
8 | |
9 function tabCloseListener() { | |
10 receivedEvents.push("onTabClose"); | |
11 } | |
12 | |
13 function registerListenersForTab(tabId) { | |
14 devtoolsTabEvents = chrome.devtools.getTabEvents(tabId); | |
15 devtoolsTabEvents.onPageEvent.addListener(pageEventListener); | |
16 devtoolsTabEvents.onTabClose.addListener(tabCloseListener); | |
17 window.domAutomationController.send(true); | |
18 } | |
19 | |
20 function unregisterListeners() { | |
21 devtoolsTabEvents.onPageEvent.removeListener(pageEventListener); | |
22 devtoolsTabEvents.onTabClose.removeListener(tabCloseListener); | |
23 window.domAutomationController.send(true); | |
24 } | |
25 | |
26 </script> | |
OLD | NEW |