WorkerGlobalScope.idl 983 B

12345678910111213141516171819202122232425262728
  1. #import <DOM/EventTarget.idl>
  2. #import <DOM/EventHandler.idl>
  3. #import <HTML/WorkerLocation.idl>
  4. #import <HTML/WorkerNavigator.idl>
  5. [Exposed=Worker]
  6. interface WorkerGlobalScope : EventTarget {
  7. readonly attribute WorkerGlobalScope self;
  8. readonly attribute WorkerLocation location;
  9. readonly attribute WorkerNavigator navigator;
  10. undefined importScripts(USVString... urls);
  11. attribute OnErrorEventHandler 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. };