nsIWorkerDebugger.idl 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include "nsISupports.idl"
  2. interface mozIDOMWindow;
  3. interface nsIPrincipal;
  4. [scriptable, uuid(9cf3b48e-361d-486a-8917-55cf8d00bb41)]
  5. interface nsIWorkerDebuggerListener : nsISupports
  6. {
  7. void onClose();
  8. void onError(in DOMString filename, in unsigned long lineno,
  9. in DOMString message);
  10. void onMessage(in DOMString message);
  11. };
  12. [scriptable, builtinclass, uuid(22f93aa3-8a05-46be-87e0-fa93bf8a8eff)]
  13. interface nsIWorkerDebugger : nsISupports
  14. {
  15. const unsigned long TYPE_DEDICATED = 0;
  16. const unsigned long TYPE_SHARED = 1;
  17. const unsigned long TYPE_SERVICE = 2;
  18. readonly attribute bool isClosed;
  19. readonly attribute bool isChrome;
  20. readonly attribute bool isInitialized;
  21. readonly attribute nsIWorkerDebugger parent;
  22. readonly attribute unsigned long type;
  23. readonly attribute DOMString url;
  24. readonly attribute mozIDOMWindow window;
  25. readonly attribute nsIPrincipal principal;
  26. readonly attribute unsigned long serviceWorkerID;
  27. void initialize(in DOMString url);
  28. [binaryname(PostMessageMoz)]
  29. void postMessage(in DOMString message);
  30. void addListener(in nsIWorkerDebuggerListener listener);
  31. void removeListener(in nsIWorkerDebuggerListener listener);
  32. };