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 undefined loadSubScript(DOMString url, optional object sandbox);
17 undefined enterEventLoop();
19 undefined leaveEventLoop();
21 undefined postMessage(DOMString message);
23 attribute EventHandler onmessage;
25 attribute EventHandler onmessageerror;
28 undefined setImmediate(Function handler);
30 undefined reportError(DOMString message);
33 sequence<any> retrieveConsoleEvents();
36 undefined setConsoleEventHandler(AnyCallback? handler);
39 undefined clearConsoleEvents();
41 // base64 utility methods
43 DOMString btoa(DOMString btoa);
45 DOMString atob(DOMString atob);
48 // So you can debug while you debug
49 partial interface WorkerDebuggerGlobalScope {
50 undefined dump(optional DOMString string);