Window.idl 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #import <DOM/Document.idl>
  2. #import <DOM/EventHandler.idl>
  3. #import <DOM/EventTarget.idl>
  4. #import <HTML/Navigator.idl>
  5. // https://html.spec.whatwg.org/multipage/nav-history-apis.html#window
  6. [Global=Window, Exposed=Window, LegacyUnenumerableNamedProperties, UseNewAKString]
  7. interface Window : EventTarget {
  8. // the current browsing context
  9. [LegacyUnforgeable] readonly attribute WindowProxy window;
  10. [Replaceable] readonly attribute WindowProxy self;
  11. [LegacyUnforgeable] readonly attribute Document document;
  12. attribute DOMString name;
  13. [PutForwards=href, LegacyUnforgeable] readonly attribute Location location;
  14. readonly attribute History history;
  15. // other browsing contexts
  16. [Replaceable] readonly attribute WindowProxy frames;
  17. [Replaceable] readonly attribute unsigned long length;
  18. [LegacyUnforgeable] readonly attribute WindowProxy? top;
  19. // the user agent
  20. readonly attribute Navigator navigator;
  21. [ImplementedAs=navigator] readonly attribute Navigator clientInformation; // legacy alias of .navigator
  22. // user prompts
  23. undefined alert();
  24. undefined alert(DOMString message);
  25. boolean confirm(optional DOMString message = "");
  26. DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
  27. undefined postMessage(any message, USVString targetOrigin);
  28. // FIXME: undefined postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []);
  29. // FIXME: undefined postMessage(any message, optional WindowPostMessageOptions options = {});
  30. };
  31. Window includes GlobalEventHandlers;
  32. Window includes WindowEventHandlers;