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[Global=(WorkerDebugger), Exposed=WorkerDebugger]
7interface WorkerDebuggerGlobalScope : EventTarget {
8  [Throws]
9  readonly attribute object global;
10
11  [Throws]
12  object createSandbox(DOMString name, object prototype);
13
14  [Throws]
15  void loadSubScript(DOMString url, optional object sandbox);
16
17  void enterEventLoop();
18
19  void leaveEventLoop();
20
21  void postMessage(DOMString message);
22
23  attribute EventHandler onmessage;
24
25  [Throws]
26  void setImmediate(Function handler);
27
28  void reportError(DOMString message);
29
30  [Throws]
31  sequence<any> retrieveConsoleEvents();
32
33  [Throws]
34  void setConsoleEventHandler(AnyCallback? handler);
35};
36
37// So you can debug while you debug
38partial interface WorkerDebuggerGlobalScope {
39  void dump(optional DOMString string);
40};
41