ladybird/Userland/Libraries/LibWeb/HTML/Window.idl

46 lines
2.1 KiB
Text
Raw Normal View History

#import <DOM/Document.idl>
#import <DOM/EventHandler.idl>
#import <DOM/EventTarget.idl>
#import <HTML/Navigator.idl>
#import <HTML/WindowOrWorkerGlobalScope.idl>
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#window
[Global=Window, Exposed=Window, LegacyUnenumerableNamedProperties, UseNewAKString]
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;
[LegacyUnforgeable] readonly attribute Document document;
2023-03-05 19:02:16 +00:00
attribute DOMString name;
[PutForwards=href, LegacyUnforgeable] readonly attribute Location location;
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;
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
// the user agent
readonly attribute Navigator navigator;
[ImplementedAs=navigator] readonly attribute Navigator clientInformation; // legacy alias of .navigator
// user prompts
undefined alert();
undefined alert(DOMString message);
boolean confirm(optional DOMString message = "");
DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
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
};
Window includes GlobalEventHandlers;
Window includes WindowEventHandlers;
Window includes WindowOrWorkerGlobalScope;