WorkerGlobalScope.idl 993 B

1234567891011121314151617181920212223242526272829
  1. #import <DOM/EventTarget.idl>
  2. #import <HTML/WorkerLocation.idl>
  3. #import <HTML/WorkerNavigator.idl>
  4. [Exposed=Worker]
  5. interface WorkerGlobalScope : EventTarget {
  6. readonly attribute WorkerGlobalScope self;
  7. readonly attribute WorkerLocation location;
  8. readonly attribute WorkerNavigator navigator;
  9. undefined importScripts(USVString... urls);
  10. // FIXME: Should be an OnErrorEventHandler
  11. attribute EventHandler onerror;
  12. attribute EventHandler onlanguagechange;
  13. attribute EventHandler onoffline;
  14. attribute EventHandler ononline;
  15. attribute EventHandler onrejectionhandled;
  16. attribute EventHandler onunhandledrejection;
  17. // FIXME: These should all come from a WindowOrWorkerGlobalScope mixin
  18. [Replaceable] readonly attribute USVString origin;
  19. readonly attribute boolean isSecureContext;
  20. readonly attribute boolean crossOriginIsolated;
  21. // base64 utility methods
  22. DOMString btoa(DOMString data);
  23. ByteString atob(DOMString data);
  24. };