DebuggerNotificationObserver.webidl (1095B)
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 */ 6 7 callback DebuggerNotificationCallback = undefined (DebuggerNotification n); 8 9 [ChromeOnly, Exposed=(Window, Worker)] 10 interface DebuggerNotificationObserver { 11 [Throws] 12 constructor(); 13 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); 19 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); 25 26 // Returns false if listener already added. 27 boolean addListener(DebuggerNotificationCallback handler); 28 29 // Returns false if listener was not found. 30 boolean removeListener(DebuggerNotificationCallback handler); 31 };