Bug 1839170 - Refactor Snap pulling, Add Firefox Snap Core22 and GNOME 42 SDK symbols...
[gecko.git] / dom / chrome-webidl / DebuggerNotificationObserver.webidl
blobe37d2dc312ed21f081857484a7e1fc2a35eefdad
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/.
5  */
7 callback DebuggerNotificationCallback = undefined (DebuggerNotification n);
9 [ChromeOnly, Exposed=(Window, Worker)]
10 interface DebuggerNotificationObserver {
11   [Throws]
12   constructor();
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.
17   [Throws]
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.
23   [Throws]
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);