1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
7 callback DebuggerNotificationCallback = undefined (DebuggerNotification n);
9 [ChromeOnly, Exposed=(Window, Worker)]
10 interface DebuggerNotificationObserver {
14 // Throws if the object is not a browser global or does not support
15 // debugger notifications.
16 // Returns false if already connected to this global.
18 boolean connect(object global);
20 // Throws if the object is not a browser global or does not support
21 // debugger notifications.
22 // Returns false if not connected to this global.
24 boolean disconnect(object global);
26 // Returns false if listener already added.
27 boolean addListener(DebuggerNotificationCallback handler);
29 // Returns false if listener was not found.
30 boolean removeListener(DebuggerNotificationCallback handler);