aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/codegen/Window.webidl
blob: 6240365be94f13df9df0538e79b1bdca0a2475c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * The origin of this IDL file is:
 * http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-window-object
 */

[NamedPropertiesObject]
/*sealed*/ interface Window /*: EventTarget*/ {
  // the current browsing context
  /*[Unforgeable] readonly attribute WindowProxy window;
    [Replaceable] readonly attribute WindowProxy self;*/
  [Unforgeable] readonly attribute Document document;
           attribute DOMString name; 
  /*[PutForwards=href, Unforgeable] readonly attribute Location location;
  readonly attribute History history;
  [Replaceable] readonly attribute BarProp locationbar;
  [Replaceable] readonly attribute BarProp menubar;
  [Replaceable] readonly attribute BarProp personalbar;
  [Replaceable] readonly attribute BarProp scrollbars;
  [Replaceable] readonly attribute BarProp statusbar;
  [Replaceable] readonly attribute BarProp toolbar;*/
           attribute DOMString status;
  void close();
  readonly attribute boolean closed;
  void stop();
  void focus();
  void blur();

  // other browsing contexts
  /*[Replaceable] readonly attribute WindowProxy frames;
  [Replaceable] readonly attribute unsigned long length;
  [Unforgeable] readonly attribute WindowProxy top;
           attribute WindowProxy? opener;
           readonly attribute WindowProxy parent;*/
  readonly attribute Element? frameElement;
  /*WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", optional DOMString features = "", optional boolean replace = false);
    getter WindowProxy (unsigned long index);*/
  getter object (DOMString name);

  // the user agent
  /*readonly attribute Navigator navigator; 
  readonly attribute External external;
  readonly attribute ApplicationCache applicationCache;*/

  // user prompts
  void alert(optional DOMString message = "");
  boolean confirm(optional DOMString message = "");
  DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
  void print();
  any showModalDialog(DOMString url, optional any argument);


};
/*Window implements GlobalEventHandlers;
  Window implements WindowEventHandlers;*/

[NoInterfaceObject]
interface WindowTimers {
  //long setTimeout(Function handler, optional long timeout, any... arguments);
  //XXXjdm No support for Function or variadic arguments yet
  long setTimeout(any handler, optional long timeout/*, any... arguments*/);
  /*long setTimeout(DOMString handler, optional long timeout, any... arguments);
  void clearTimeout(long handle);
  long setInterval(Function handler, optional long timeout, any... arguments);
  long setInterval(DOMString handler, optional long timeout, any... arguments);
  void clearInterval(long handle);*/
};
Window implements WindowTimers;