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/. */
6 [Global=(WorkerDebugger), Exposed=WorkerDebugger]
7 interface WorkerDebuggerGlobalScope : EventTarget {
9 readonly attribute object global;
12 object createSandbox(DOMString name, object prototype);
15 void loadSubScript(DOMString url, optional object sandbox);
17 void enterEventLoop();
19 void leaveEventLoop();
21 void postMessage(DOMString message);
23 attribute EventHandler onmessage;
25 attribute EventHandler onmessageerror;
28 void setImmediate(Function handler);
30 void reportError(DOMString message);
33 sequence<any> retrieveConsoleEvents();
36 void setConsoleEventHandler(AnyCallback? handler);
38 // base64 utility methods
40 DOMString btoa(DOMString btoa);
42 DOMString atob(DOMString atob);
45 // So you can debug while you debug
46 partial interface WorkerDebuggerGlobalScope {
47 void dump(optional DOMString string);