Bug 1795723 - Unified extensions UI should support High Contrast Mode. r=ayeddi,deskt...
[gecko.git] / dom / workers / nsIWorkerDebugger.idl
blob35b58e78e54fd9489edf9bc147338267571f611c
1 #include "nsISupports.idl"
3 interface mozIDOMWindow;
4 interface nsIPrincipal;
6 [scriptable, uuid(9cf3b48e-361d-486a-8917-55cf8d00bb41)]
7 interface nsIWorkerDebuggerListener : nsISupports
9 void onClose();
11 void onError(in AString filename, in unsigned long lineno,
12 in AString message);
14 void onMessage(in AString message);
17 [scriptable, builtinclass, uuid(22f93aa3-8a05-46be-87e0-fa93bf8a8eff)]
18 interface nsIWorkerDebugger : nsISupports
20 const unsigned long TYPE_DEDICATED = 0;
21 const unsigned long TYPE_SHARED = 1;
22 const unsigned long TYPE_SERVICE = 2;
24 readonly attribute bool isClosed;
26 readonly attribute bool isChrome;
28 readonly attribute bool isInitialized;
30 readonly attribute nsIWorkerDebugger parent;
32 readonly attribute unsigned long type;
34 readonly attribute AString url;
36 // If this is a dedicated worker, the window this worker or (in the case of
37 // nested workers) its top-level ancestral worker is associated with.
38 readonly attribute mozIDOMWindow window;
40 readonly attribute Array<uint64_t> windowIDs;
42 readonly attribute nsIPrincipal principal;
44 readonly attribute unsigned long serviceWorkerID;
46 readonly attribute AString id;
48 void initialize(in AString url);
50 [binaryname(PostMessageMoz)]
51 void postMessage(in AString message);
53 void addListener(in nsIWorkerDebuggerListener listener);
55 void removeListener(in nsIWorkerDebuggerListener listener);
57 // Indicate whether the debugger has finished initializing. By default the
58 // debugger will be considered initialized when the onRegister hooks in all
59 // nsIWorkerDebuggerManagerListener have been called.
61 // setDebuggerReady(false) can be called during an onRegister hook to mark
62 // the debugger as not being ready yet. This will prevent all content from
63 // running in the worker, including the worker's main script and any messages
64 // posted to it. Other runnables will still execute in the worker as normal.
66 // When the debugger is ready, setDebuggerReady(true) should then be called
67 // to allow the worker to begin executing content.
68 void setDebuggerReady(in boolean ready);