2013-04-25 19:13:21 +04:00
|
|
|
/* -*- 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:
|
2013-10-08 19:51:42 +04:00
|
|
|
* http://www.whatwg.org/specs/web-apps/current-work/
|
|
|
|
* https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
|
|
|
|
* https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
|
|
|
|
* http://dev.w3.org/csswg/cssom/
|
|
|
|
* http://dev.w3.org/csswg/cssom-view/
|
2013-04-25 19:13:21 +04:00
|
|
|
* https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
|
2013-10-08 19:51:42 +04:00
|
|
|
* https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
|
|
|
|
* https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
|
|
|
|
* http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
|
2013-04-25 19:13:21 +04:00
|
|
|
*/
|
|
|
|
|
2013-10-08 19:51:42 +04:00
|
|
|
interface ApplicationCache;
|
2014-02-16 01:12:33 +04:00
|
|
|
interface IID;
|
2013-10-08 19:51:42 +04:00
|
|
|
interface MozFrameRequestCallback;
|
2014-02-06 08:37:30 +04:00
|
|
|
interface nsIBrowserDOMWindow;
|
|
|
|
interface nsIMessageBroadcaster;
|
2013-10-08 19:51:42 +04:00
|
|
|
interface nsIDOMCrypto;
|
|
|
|
typedef any Transferable;
|
|
|
|
|
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/
|
2014-08-05 06:20:34 +04:00
|
|
|
[PrimaryGlobal, NeedNewResolve]
|
2013-10-08 19:51:42 +04:00
|
|
|
/*sealed*/ interface Window : EventTarget {
|
|
|
|
// the current browsing context
|
2013-12-09 19:34:03 +04:00
|
|
|
[Unforgeable, Throws,
|
|
|
|
CrossOriginReadable] readonly attribute WindowProxy window;
|
|
|
|
[Replaceable, Throws,
|
|
|
|
CrossOriginReadable] readonly attribute WindowProxy self;
|
2014-09-05 22:28:45 +04:00
|
|
|
[Unforgeable, StoreInSlot, Pure] readonly attribute Document? document;
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] attribute DOMString name;
|
2013-12-09 19:34:03 +04:00
|
|
|
[PutForwards=href, Unforgeable, Throws,
|
|
|
|
CrossOriginReadable, CrossOriginWritable] readonly attribute Location? location;
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] readonly attribute History history;
|
|
|
|
[Replaceable, Throws] readonly attribute BarProp locationbar;
|
|
|
|
[Replaceable, Throws] readonly attribute BarProp menubar;
|
|
|
|
[Replaceable, Throws] readonly attribute BarProp personalbar;
|
|
|
|
[Replaceable, Throws] readonly attribute BarProp scrollbars;
|
|
|
|
[Replaceable, Throws] readonly attribute BarProp statusbar;
|
|
|
|
[Replaceable, Throws] readonly attribute BarProp toolbar;
|
|
|
|
[Throws] attribute DOMString status;
|
2013-12-09 19:34:03 +04:00
|
|
|
[Throws, CrossOriginCallable] void close();
|
|
|
|
[Throws, CrossOriginReadable] readonly attribute boolean closed;
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] void stop();
|
2013-12-09 19:34:03 +04:00
|
|
|
[Throws, CrossOriginCallable] void focus();
|
|
|
|
[Throws, CrossOriginCallable] void blur();
|
2013-10-08 19:51:42 +04:00
|
|
|
|
|
|
|
// other browsing contexts
|
2013-12-09 19:34:03 +04:00
|
|
|
[Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy frames;
|
|
|
|
[Replaceable, CrossOriginReadable] readonly attribute unsigned long length;
|
2014-05-22 22:43:11 +04:00
|
|
|
//[Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy top;
|
|
|
|
[Unforgeable, Throws, CrossOriginReadable] readonly attribute WindowProxy? top;
|
2014-06-03 19:38:37 +04:00
|
|
|
[Throws, CrossOriginReadable] attribute any opener;
|
2013-10-08 19:51:42 +04:00
|
|
|
//[Throws] readonly attribute WindowProxy parent;
|
2013-12-09 19:34:03 +04:00
|
|
|
[Replaceable, Throws, CrossOriginReadable] readonly attribute WindowProxy? parent;
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] readonly attribute Element? frameElement;
|
2014-05-13 22:08:34 +04:00
|
|
|
//[Throws] WindowProxy open(optional DOMString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "", optional boolean replace = false);
|
|
|
|
[Throws] WindowProxy? open(optional DOMString url = "", optional DOMString target = "", [TreatNullAs=EmptyString] optional DOMString features = "");
|
2013-10-08 19:51:42 +04:00
|
|
|
// We think the indexed getter is a bug in the spec, it actually needs to live
|
|
|
|
// on the WindowProxy
|
|
|
|
//getter WindowProxy (unsigned long index);
|
2014-09-06 00:36:32 +04:00
|
|
|
getter object (DOMString name);
|
2013-10-08 19:51:42 +04:00
|
|
|
|
|
|
|
// the user agent
|
|
|
|
[Throws] readonly attribute Navigator navigator;
|
2014-03-28 08:03:03 +04:00
|
|
|
#ifdef HAVE_SIDEBAR
|
|
|
|
[Replaceable, Throws] readonly attribute External external;
|
|
|
|
#endif
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] readonly attribute ApplicationCache applicationCache;
|
|
|
|
|
|
|
|
// user prompts
|
2014-05-21 00:07:17 +04:00
|
|
|
[Throws] void alert();
|
|
|
|
[Throws] void alert(DOMString message);
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] boolean confirm(optional DOMString message = "");
|
|
|
|
[Throws] DOMString? prompt(optional DOMString message = "", optional DOMString default = "");
|
|
|
|
[Throws] void print();
|
|
|
|
//[Throws] any showModalDialog(DOMString url, optional any argument);
|
2014-07-26 09:41:10 +04:00
|
|
|
[Throws, Func="nsGlobalWindow::IsShowModalDialogEnabled"]
|
|
|
|
any showModalDialog(DOMString url, optional any argument, optional DOMString options = "");
|
2013-10-08 19:51:42 +04:00
|
|
|
|
2013-12-09 19:34:03 +04:00
|
|
|
[Throws, CrossOriginCallable] void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer);
|
2013-10-08 19:51:42 +04:00
|
|
|
|
|
|
|
// also has obsolete members
|
|
|
|
};
|
|
|
|
Window implements GlobalEventHandlers;
|
|
|
|
Window implements WindowEventHandlers;
|
|
|
|
|
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/
|
2014-08-05 06:20:34 +04:00
|
|
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
2013-10-08 19:51:42 +04:00
|
|
|
interface WindowTimers {
|
|
|
|
[Throws] long setTimeout(Function handler, optional long timeout = 0, any... arguments);
|
2014-02-19 19:13:38 +04:00
|
|
|
[Throws] long setTimeout(DOMString handler, optional long timeout = 0, any... unused);
|
2014-02-23 09:01:26 +04:00
|
|
|
[Throws] void clearTimeout(optional long handle = 0);
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] long setInterval(Function handler, optional long timeout, any... arguments);
|
2014-02-19 19:13:38 +04:00
|
|
|
[Throws] long setInterval(DOMString handler, optional long timeout, any... unused);
|
2014-02-23 09:01:26 +04:00
|
|
|
[Throws] void clearInterval(optional long handle = 0);
|
2013-10-08 19:51:42 +04:00
|
|
|
};
|
|
|
|
Window implements WindowTimers;
|
|
|
|
|
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/
|
2014-08-05 06:20:34 +04:00
|
|
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
2013-10-08 19:51:42 +04:00
|
|
|
interface WindowBase64 {
|
|
|
|
[Throws] DOMString btoa(DOMString btoa);
|
|
|
|
[Throws] DOMString atob(DOMString atob);
|
|
|
|
};
|
|
|
|
Window implements WindowBase64;
|
|
|
|
|
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface WindowSessionStorage {
|
|
|
|
//[Throws] readonly attribute Storage sessionStorage;
|
|
|
|
[Throws] readonly attribute Storage? sessionStorage;
|
|
|
|
};
|
|
|
|
Window implements WindowSessionStorage;
|
|
|
|
|
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface WindowLocalStorage {
|
|
|
|
[Throws] readonly attribute Storage? localStorage;
|
|
|
|
};
|
|
|
|
Window implements WindowLocalStorage;
|
|
|
|
|
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/
|
|
|
|
partial interface Window {
|
2014-02-09 12:04:39 +04:00
|
|
|
void captureEvents();
|
|
|
|
void releaseEvents();
|
2013-10-08 19:51:42 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
|
|
|
|
partial interface Window {
|
|
|
|
//[Throws] Selection getSelection();
|
|
|
|
[Throws] Selection? getSelection();
|
|
|
|
};
|
|
|
|
|
|
|
|
// https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
|
|
|
|
Window implements IDBEnvironment;
|
|
|
|
|
|
|
|
// http://dev.w3.org/csswg/cssom/
|
|
|
|
partial interface Window {
|
|
|
|
//[NewObject, Throws] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
|
|
|
[NewObject, Throws] CSSStyleDeclaration? getComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
|
|
|
};
|
|
|
|
|
|
|
|
// http://dev.w3.org/csswg/cssom-view/
|
|
|
|
enum ScrollBehavior { "auto", "instant", "smooth" };
|
|
|
|
|
|
|
|
dictionary ScrollOptions {
|
|
|
|
ScrollBehavior behavior = "auto";
|
|
|
|
};
|
|
|
|
|
Bug 1045754 - Part 1 - Implement updated CSSOM-View smooth-scrolling specification. r=bz
- Added new WebIDL dictionary, ScrollToOptions. This dictionary extends
ScrollOptions by adding "left" and "top", specifying the scroll offset.
This will be later extended with more members to allow scroll offsets to be
specified with logical axes.
- Implemented Window.Scroll, Window.ScrollTo, Window.ScrollBy, Element.Scroll,
Element.ScrollTo, and Element.ScrollBy functions that accept ScrollToOptions
as a single parameter.
- Removed ScrollOptions dictionary parameter from existing Window.Scroll,
Window.ScrollTo, and Window.ScrollBy functions as these have been replaced
with functions accepting a single parameter, ScrollToOptions.
- Added new WebIDL dictionary, ScrollIntoViewOptions. This dictionary
extends ScrollOptions by adding "block", specifying whether the element
start or end will be scrolled into view.
- Replaced Element.ScrollIntoView(bool,ScrollOptions) with
Element.ScrollIntoView(ScrollIntoViewOptions) to match updated
CSSOM-View scroll-behavior specification.
2014-10-01 21:47:56 +04:00
|
|
|
dictionary ScrollToOptions : ScrollOptions {
|
|
|
|
unrestricted double left;
|
|
|
|
unrestricted double top;
|
|
|
|
};
|
|
|
|
|
2013-10-08 19:51:42 +04:00
|
|
|
partial interface Window {
|
2013-12-16 18:03:34 +04:00
|
|
|
//[Throws,NewObject] MediaQueryList matchMedia(DOMString query);
|
|
|
|
[Throws,NewObject] MediaQueryList? matchMedia(DOMString query);
|
2013-10-08 19:51:42 +04:00
|
|
|
//[SameObject]
|
|
|
|
[Throws] readonly attribute Screen screen;
|
|
|
|
|
|
|
|
// browsing context
|
|
|
|
//[Throws] void moveTo(double x, double y);
|
|
|
|
//[Throws] void moveBy(double x, double y);
|
|
|
|
//[Throws] void resizeTo(double x, double y);
|
|
|
|
//[Throws] void resizeBy(double x, double y);
|
|
|
|
[Throws] void moveTo(long x, long y);
|
|
|
|
[Throws] void moveBy(long x, long y);
|
|
|
|
[Throws] void resizeTo(long x, long y);
|
|
|
|
[Throws] void resizeBy(long x, long y);
|
|
|
|
|
|
|
|
// viewport
|
|
|
|
//[Throws] readonly attribute double innerWidth;
|
|
|
|
//[Throws] readonly attribute double innerHeight;
|
|
|
|
[Throws] attribute long innerWidth;
|
|
|
|
[Throws] attribute long innerHeight;
|
|
|
|
|
|
|
|
// viewport scrolling
|
|
|
|
//[Throws] readonly attribute double scrollX;
|
|
|
|
//[Throws] readonly attribute double pageXOffset;
|
|
|
|
//[Throws] readonly attribute double scrollY;
|
|
|
|
//[Throws] readonly attribute double pageYOffset;
|
Bug 1045754 - Part 1 - Implement updated CSSOM-View smooth-scrolling specification. r=bz
- Added new WebIDL dictionary, ScrollToOptions. This dictionary extends
ScrollOptions by adding "left" and "top", specifying the scroll offset.
This will be later extended with more members to allow scroll offsets to be
specified with logical axes.
- Implemented Window.Scroll, Window.ScrollTo, Window.ScrollBy, Element.Scroll,
Element.ScrollTo, and Element.ScrollBy functions that accept ScrollToOptions
as a single parameter.
- Removed ScrollOptions dictionary parameter from existing Window.Scroll,
Window.ScrollTo, and Window.ScrollBy functions as these have been replaced
with functions accepting a single parameter, ScrollToOptions.
- Added new WebIDL dictionary, ScrollIntoViewOptions. This dictionary
extends ScrollOptions by adding "block", specifying whether the element
start or end will be scrolled into view.
- Replaced Element.ScrollIntoView(bool,ScrollOptions) with
Element.ScrollIntoView(ScrollIntoViewOptions) to match updated
CSSOM-View scroll-behavior specification.
2014-10-01 21:47:56 +04:00
|
|
|
void scroll(unrestricted double x, unrestricted double y);
|
|
|
|
void scroll(optional ScrollToOptions options);
|
|
|
|
void scrollTo(unrestricted double x, unrestricted double y);
|
|
|
|
void scrollTo(optional ScrollToOptions options);
|
|
|
|
void scrollBy(unrestricted double x, unrestricted double y);
|
|
|
|
void scrollBy(optional ScrollToOptions options);
|
2013-10-08 19:51:42 +04:00
|
|
|
[Replaceable, Throws] readonly attribute long scrollX;
|
|
|
|
[Throws] readonly attribute long pageXOffset;
|
|
|
|
[Replaceable, Throws] readonly attribute long scrollY;
|
|
|
|
[Throws] readonly attribute long pageYOffset;
|
|
|
|
|
|
|
|
// client
|
|
|
|
//[Throws] readonly attribute double screenX;
|
|
|
|
//[Throws] readonly attribute double screenY;
|
|
|
|
//[Throws] readonly attribute double outerWidth;
|
|
|
|
//[Throws] readonly attribute double outerHeight;
|
|
|
|
[Throws] attribute long screenX;
|
|
|
|
[Throws] attribute long screenY;
|
|
|
|
[Throws] attribute long outerWidth;
|
|
|
|
[Throws] attribute long outerHeight;
|
|
|
|
};
|
|
|
|
|
2014-05-08 19:32:00 +04:00
|
|
|
/**
|
|
|
|
* Special function that gets the fill ratio from the compositor used for testing
|
|
|
|
* and is an indicator that we're layerizing correctly.
|
|
|
|
* This function will call the given callback current fill ratio for a
|
|
|
|
* composited frame. We don't guarantee which frame fill ratios will be returned.
|
|
|
|
*/
|
|
|
|
partial interface Window {
|
|
|
|
[ChromeOnly, Throws] void mozRequestOverfill(OverfillCallback callback);
|
|
|
|
};
|
|
|
|
callback OverfillCallback = void (unsigned long overfill);
|
|
|
|
|
2013-10-08 19:51:42 +04:00
|
|
|
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
|
|
|
|
partial interface Window {
|
|
|
|
[Throws] long requestAnimationFrame(FrameRequestCallback callback);
|
|
|
|
[Throws] void cancelAnimationFrame(long handle);
|
|
|
|
};
|
2013-04-25 19:13:21 +04:00
|
|
|
callback FrameRequestCallback = void (DOMHighResTimeStamp time);
|
2013-10-08 19:51:15 +04:00
|
|
|
|
2013-10-08 19:51:42 +04:00
|
|
|
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
|
|
|
|
partial interface Window {
|
2014-09-06 06:42:33 +04:00
|
|
|
[Replaceable, Pure, StoreInSlot] readonly attribute Performance? performance;
|
2013-10-08 19:51:42 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
// https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html
|
|
|
|
partial interface Window {
|
|
|
|
//[Throws] readonly attribute Crypto crypto;
|
|
|
|
[Throws] readonly attribute nsIDOMCrypto crypto;
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef MOZ_WEBSPEECH
|
|
|
|
// http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface SpeechSynthesisGetter {
|
|
|
|
[Throws, Pref="media.webspeech.synth.enabled"] readonly attribute SpeechSynthesis speechSynthesis;
|
|
|
|
};
|
|
|
|
|
|
|
|
Window implements SpeechSynthesisGetter;
|
|
|
|
#endif
|
|
|
|
|
2014-02-06 01:09:18 +04:00
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface WindowModal {
|
|
|
|
[Throws, Func="nsGlobalWindow::IsModalContentWindow"] readonly attribute any dialogArguments;
|
|
|
|
[Throws, Func="nsGlobalWindow::IsModalContentWindow"] attribute any returnValue;
|
|
|
|
};
|
|
|
|
Window implements WindowModal;
|
|
|
|
|
2013-10-08 19:51:42 +04:00
|
|
|
// Mozilla-specific stuff
|
|
|
|
partial interface Window {
|
|
|
|
//[NewObject, Throws] CSSStyleDeclaration getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
|
|
|
[NewObject, Throws] CSSStyleDeclaration? getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = "");
|
|
|
|
|
|
|
|
[Throws] long mozRequestAnimationFrame(MozFrameRequestCallback aCallback);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cancel a refresh callback.
|
|
|
|
*/
|
|
|
|
[Throws] void mozCancelAnimationFrame(long aHandle);
|
|
|
|
// Backwards-compat shim for now to make Google maps work
|
|
|
|
[Throws] void mozCancelRequestAnimationFrame(long aHandle);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The current animation start time in milliseconds since the epoch.
|
|
|
|
*/
|
|
|
|
[Throws] readonly attribute long long mozAnimationStartTime;
|
|
|
|
|
|
|
|
// Mozilla extensions
|
|
|
|
/**
|
|
|
|
* Method for scrolling this window by a number of lines.
|
|
|
|
*/
|
2014-08-06 02:01:32 +04:00
|
|
|
void scrollByLines(long numLines, optional ScrollOptions options);
|
2013-10-08 19:51:42 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Method for scrolling this window by a number of pages.
|
|
|
|
*/
|
2014-08-06 02:01:32 +04:00
|
|
|
void scrollByPages(long numPages, optional ScrollOptions options);
|
2013-10-08 19:51:42 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Method for sizing this window to the content in the window.
|
|
|
|
*/
|
|
|
|
[Throws] void sizeToContent();
|
|
|
|
|
|
|
|
// XXX Shouldn't this be in nsIDOMChromeWindow?
|
2014-01-17 03:45:40 +04:00
|
|
|
[ChromeOnly, Replaceable, Throws] readonly attribute MozControllers controllers;
|
2013-10-08 19:51:42 +04:00
|
|
|
|
2014-06-04 22:11:05 +04:00
|
|
|
[ChromeOnly, Throws] readonly attribute Element? realFrameElement;
|
|
|
|
|
2013-10-08 19:51:42 +04:00
|
|
|
[Throws] readonly attribute float mozInnerScreenX;
|
|
|
|
[Throws] readonly attribute float mozInnerScreenY;
|
|
|
|
[Throws] readonly attribute float devicePixelRatio;
|
|
|
|
|
|
|
|
/* The maximum offset that the window can be scrolled to
|
|
|
|
(i.e., the document width/height minus the scrollport width/height) */
|
|
|
|
[Replaceable, Throws] readonly attribute long scrollMaxX;
|
|
|
|
[Replaceable, Throws] readonly attribute long scrollMaxY;
|
|
|
|
|
|
|
|
[Throws] attribute boolean fullScreen;
|
|
|
|
|
2014-05-21 00:07:17 +04:00
|
|
|
[Throws, ChromeOnly] void back();
|
|
|
|
[Throws, ChromeOnly] void forward();
|
|
|
|
[Throws, ChromeOnly] void home();
|
2013-10-08 19:51:42 +04:00
|
|
|
|
|
|
|
// XXX Should this be in nsIDOMChromeWindow?
|
2014-07-28 03:21:00 +04:00
|
|
|
void updateCommands(DOMString action,
|
|
|
|
optional Selection? sel = null,
|
|
|
|
optional short reason = 0);
|
2013-10-08 19:51:42 +04:00
|
|
|
|
|
|
|
/* Find in page.
|
|
|
|
* @param str: the search pattern
|
|
|
|
* @param caseSensitive: is the search caseSensitive
|
|
|
|
* @param backwards: should we search backwards
|
|
|
|
* @param wrapAround: should we wrap the search
|
|
|
|
* @param wholeWord: should we search only for whole words
|
|
|
|
* @param searchInFrames: should we search through all frames
|
|
|
|
* @param showDialog: should we show the Find dialog
|
|
|
|
*/
|
|
|
|
[Throws] boolean find(optional DOMString str = "",
|
|
|
|
optional boolean caseSensitive = false,
|
|
|
|
optional boolean backwards = false,
|
|
|
|
optional boolean wrapAround = false,
|
|
|
|
optional boolean wholeWord = false,
|
|
|
|
optional boolean searchInFrames = false,
|
|
|
|
optional boolean showDialog = false);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the number of times this document for this window has
|
|
|
|
* been painted to the screen.
|
|
|
|
*/
|
|
|
|
[Throws] readonly attribute unsigned long long mozPaintCount;
|
|
|
|
|
2014-08-26 18:11:15 +04:00
|
|
|
/**
|
|
|
|
* This property exists because static attributes don't yet work for
|
|
|
|
* JS-implemented WebIDL (see bugs 1058606 and 863952). With this hack, we
|
|
|
|
* can use `MozSelfSupport.something(...)`, which will continue to work
|
|
|
|
* after we ditch this property and switch to static attributes. See
|
|
|
|
*/
|
|
|
|
[ChromeOnly, Throws] readonly attribute MozSelfSupport MozSelfSupport;
|
|
|
|
|
2014-02-16 01:12:33 +04:00
|
|
|
[Pure]
|
|
|
|
attribute EventHandler onwheel;
|
|
|
|
|
2013-10-08 19:51:42 +04:00
|
|
|
attribute EventHandler ondevicemotion;
|
|
|
|
attribute EventHandler ondeviceorientation;
|
|
|
|
attribute EventHandler ondeviceproximity;
|
|
|
|
attribute EventHandler onuserproximity;
|
|
|
|
attribute EventHandler ondevicelight;
|
|
|
|
|
|
|
|
#ifdef MOZ_B2G
|
|
|
|
attribute EventHandler onmoztimechange;
|
|
|
|
attribute EventHandler onmoznetworkupload;
|
|
|
|
attribute EventHandler onmoznetworkdownload;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void dump(DOMString str);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is here for backwards compatibility with 4.x only,
|
|
|
|
* its implementation is a no-op
|
|
|
|
*/
|
|
|
|
void setResizable(boolean resizable);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is the scriptable version of
|
|
|
|
* nsIDOMWindow::openDialog() that takes 3 optional
|
|
|
|
* arguments, plus any additional arguments are passed on as
|
|
|
|
* arguments on the dialog's window object (window.arguments).
|
|
|
|
*/
|
2013-10-29 01:03:15 +04:00
|
|
|
[Throws, ChromeOnly] WindowProxy? openDialog(optional DOMString url = "",
|
|
|
|
optional DOMString name = "",
|
|
|
|
optional DOMString options = "",
|
|
|
|
any... extraArguments);
|
2013-10-08 19:51:42 +04:00
|
|
|
|
2013-10-29 01:03:07 +04:00
|
|
|
[Replaceable, Throws] readonly attribute object? content;
|
2013-12-09 19:34:04 +04:00
|
|
|
|
|
|
|
[ChromeOnly, Throws] readonly attribute object? __content;
|
2014-02-16 01:12:33 +04:00
|
|
|
|
|
|
|
[Throws, ChromeOnly] any getInterface(IID iid);
|
2013-10-08 19:51:42 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
Window implements TouchEventHandlers;
|
|
|
|
|
|
|
|
Window implements OnErrorEventHandlerForWindow;
|
2014-02-06 08:36:57 +04:00
|
|
|
|
2014-02-28 03:39:00 +04:00
|
|
|
// ConsoleAPI
|
|
|
|
partial interface Window {
|
|
|
|
[Replaceable, GetterThrows]
|
|
|
|
readonly attribute Console console;
|
|
|
|
};
|
|
|
|
|
2014-03-28 08:03:03 +04:00
|
|
|
#ifdef HAVE_SIDEBAR
|
|
|
|
// Mozilla extension
|
|
|
|
partial interface Window {
|
|
|
|
[Replaceable, Throws]
|
|
|
|
readonly attribute (External or WindowProxy) sidebar;
|
|
|
|
};
|
|
|
|
#endif
|
2014-02-28 03:39:00 +04:00
|
|
|
|
2014-02-16 01:12:34 +04:00
|
|
|
[Func="IsChromeOrXBL"]
|
|
|
|
interface ChromeWindow {
|
2014-02-06 08:37:30 +04:00
|
|
|
[Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
const unsigned short STATE_MAXIMIZED = 1;
|
|
|
|
[Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
const unsigned short STATE_MINIMIZED = 2;
|
|
|
|
[Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
const unsigned short STATE_NORMAL = 3;
|
|
|
|
[Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
const unsigned short STATE_FULLSCREEN = 4;
|
|
|
|
|
|
|
|
[Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
readonly attribute unsigned short windowState;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* browserDOMWindow provides access to yet another layer of
|
|
|
|
* utility functions implemented by chrome script. It will be null
|
|
|
|
* for DOMWindows not corresponding to browsers.
|
|
|
|
*/
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
attribute nsIBrowserDOMWindow? browserDOMWindow;
|
|
|
|
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void getAttention();
|
|
|
|
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void getAttentionWithCycleCount(long aCycleCount);
|
|
|
|
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void setCursor(DOMString cursor);
|
|
|
|
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void maximize();
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void minimize();
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void restore();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify a default button is loaded on a dialog or a wizard.
|
|
|
|
* defaultButton is the default button.
|
|
|
|
*/
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void notifyDefaultButtonLoaded(Element defaultButton);
|
|
|
|
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
readonly attribute nsIMessageBroadcaster messageManager;
|
|
|
|
|
2014-05-23 16:51:56 +04:00
|
|
|
/**
|
|
|
|
* Returns the message manager identified by the given group name that
|
|
|
|
* manages all frame loaders belonging to that group.
|
|
|
|
*/
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
nsIMessageBroadcaster getGroupMessageManager(DOMString aGroup);
|
|
|
|
|
2014-02-06 08:37:30 +04:00
|
|
|
/**
|
|
|
|
* On some operating systems, we must allow the window manager to
|
|
|
|
* handle window dragging. This function tells the window manager to
|
|
|
|
* start dragging the window. This function will fail unless called
|
|
|
|
* while the left mouse button is held down, callers must check this.
|
|
|
|
*
|
|
|
|
* The optional panel argument should be set when moving a panel.
|
|
|
|
*
|
|
|
|
* Throws NS_ERROR_NOT_IMPLEMENTED if the OS doesn't support this.
|
|
|
|
*/
|
|
|
|
[Throws, Func="nsGlobalWindow::IsChromeWindow"]
|
|
|
|
void beginWindowMove(Event mouseDownEvent, optional Element? panel = null);
|
|
|
|
};
|
2014-02-06 08:36:57 +04:00
|
|
|
|
|
|
|
Window implements ChromeWindow;
|
2014-07-25 05:30:07 +04:00
|
|
|
Window implements GlobalFetch;
|