2023-03-05 18:54:33 +00:00
|
|
|
#import <DOM/Document.idl>
|
2023-03-05 16:01:53 +00:00
|
|
|
#import <DOM/EventHandler.idl>
|
2023-03-05 15:42:58 +00:00
|
|
|
#import <DOM/EventTarget.idl>
|
2023-03-05 17:55:03 +00:00
|
|
|
#import <HTML/Navigator.idl>
|
2023-03-06 11:40:15 +00:00
|
|
|
#import <HTML/WindowOrWorkerGlobalScope.idl>
|
2023-03-05 15:42:58 +00:00
|
|
|
|
|
|
|
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#window
|
2023-03-05 16:02:35 +00:00
|
|
|
[Global=Window, Exposed=Window, LegacyUnenumerableNamedProperties, UseNewAKString]
|
2023-03-05 15:42:58 +00:00
|
|
|
interface Window : EventTarget {
|
2023-03-05 18:36:43 +00:00
|
|
|
// the current browsing context
|
|
|
|
[LegacyUnforgeable] readonly attribute WindowProxy window;
|
2023-03-05 18:38:29 +00:00
|
|
|
[Replaceable] readonly attribute WindowProxy self;
|
2023-03-05 18:54:33 +00:00
|
|
|
[LegacyUnforgeable] readonly attribute Document document;
|
2023-03-05 19:02:16 +00:00
|
|
|
attribute DOMString name;
|
2023-03-05 20:13:00 +00:00
|
|
|
[PutForwards=href, LegacyUnforgeable] readonly attribute Location location;
|
2023-03-05 20:21:35 +00:00
|
|
|
readonly attribute History history;
|
2023-03-05 18:36:43 +00:00
|
|
|
|
2023-03-05 18:48:45 +00:00
|
|
|
// other browsing contexts
|
|
|
|
[Replaceable] readonly attribute WindowProxy frames;
|
2023-03-05 20:37:41 +00:00
|
|
|
[Replaceable] readonly attribute unsigned long length;
|
2023-03-05 20:43:53 +00:00
|
|
|
[LegacyUnforgeable] readonly attribute WindowProxy? top;
|
2023-03-05 21:01:54 +00:00
|
|
|
[Replaceable] readonly attribute WindowProxy? parent;
|
2023-03-05 21:33:30 +00:00
|
|
|
readonly attribute Element? frameElement;
|
2023-03-05 21:56:26 +00:00
|
|
|
WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank", optional [LegacyNullToEmptyString] DOMString features = "");
|
2023-03-05 18:48:45 +00:00
|
|
|
|
2023-03-05 17:55:03 +00:00
|
|
|
// the user agent
|
|
|
|
readonly attribute Navigator navigator;
|
|
|
|
[ImplementedAs=navigator] readonly attribute Navigator clientInformation; // legacy alias of .navigator
|
|
|
|
|
2023-03-05 16:02:35 +00:00
|
|
|
// user prompts
|
|
|
|
undefined alert();
|
|
|
|
undefined alert(DOMString message);
|
2023-03-05 17:21:24 +00:00
|
|
|
boolean confirm(optional DOMString message = "");
|
2023-03-05 17:28:17 +00:00
|
|
|
DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
|
2023-03-05 17:36:59 +00:00
|
|
|
|
|
|
|
undefined postMessage(any message, USVString targetOrigin);
|
|
|
|
// FIXME: undefined postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []);
|
|
|
|
// FIXME: undefined postMessage(any message, optional WindowPostMessageOptions options = {});
|
2023-03-06 19:50:29 +00:00
|
|
|
|
|
|
|
// https://dom.spec.whatwg.org/#interface-window-extensions
|
|
|
|
[Replaceable] readonly attribute (Event or undefined) event; // legacy
|
2023-03-05 15:42:58 +00:00
|
|
|
};
|
2023-03-05 16:01:53 +00:00
|
|
|
Window includes GlobalEventHandlers;
|
|
|
|
Window includes WindowEventHandlers;
|
2023-03-06 11:40:15 +00:00
|
|
|
Window includes WindowOrWorkerGlobalScope;
|