2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "domstubs.idl"
|
|
|
|
|
2013-05-08 14:16:46 -07:00
|
|
|
[scriptable, uuid(f28c92a2-302a-4448-b589-46af599de352)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIDOMJSWindow : nsISupports
|
|
|
|
{
|
|
|
|
void dump(in DOMString str);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* These methods take typeless arguments and optional arguments, the
|
|
|
|
* first argument is either a function or a string, the second
|
|
|
|
* argument must be a number (ms) and the rest of the arguments (2
|
|
|
|
* ... n) are passed to the callback function
|
|
|
|
*/
|
|
|
|
long setTimeout();
|
|
|
|
long setInterval();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* These methods take one optional argument that's the timer ID to
|
|
|
|
* clear. Often in existing code these methods are passed undefined,
|
|
|
|
* which is a nop so we need to support that as well.
|
|
|
|
*/
|
2011-11-26 02:23:25 -08:00
|
|
|
void clearTimeout([optional] in long handle);
|
|
|
|
void clearInterval([optional] in long handle);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is here for backwards compatibility with 4.x only,
|
|
|
|
* its implementation is a no-op
|
|
|
|
*/
|
|
|
|
void setResizable(in boolean resizable);
|
|
|
|
|
|
|
|
/**
|
2011-07-15 03:31:34 -07:00
|
|
|
* This is the scriptable version of nsIDOMWindow::open()
|
2008-09-09 18:23:34 -07:00
|
|
|
* that takes 3 optional arguments. Its binary name is OpenJS to
|
2011-07-15 03:31:34 -07:00
|
|
|
* avoid colliding with nsIDOMWindow::open(), which has the
|
2008-09-09 18:23:34 -07:00
|
|
|
* same signature. The reason we can't have that collision is that
|
|
|
|
* the implementation needs to know whether it was called from JS or
|
|
|
|
* not.
|
|
|
|
*
|
|
|
|
* IOW, DO NOT CALL THIS FROM C++
|
|
|
|
*/
|
|
|
|
[binaryname(OpenJS)] nsIDOMWindow open([optional] in DOMString url,
|
|
|
|
[optional] in DOMString name,
|
|
|
|
[optional] in DOMString options);
|
|
|
|
|
|
|
|
/**
|
2008-09-09 19:56:09 -07:00
|
|
|
* This is the scriptable version of
|
2011-07-15 03:31:34 -07:00
|
|
|
* nsIDOMWindow::openDialog() that takes 3 optional
|
2008-09-09 18:23:34 -07:00
|
|
|
* arguments, plus any additional arguments are passed on as
|
|
|
|
* arguments on the dialog's window object (window.arguments).
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2008-09-09 18:23:34 -07:00
|
|
|
nsIDOMWindow openDialog([optional] in DOMString url,
|
|
|
|
[optional] in DOMString name,
|
|
|
|
[optional] in DOMString options);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* window.frames in Netscape 4.x and IE is just a reference to the
|
|
|
|
* window itself (i.e. window.frames === window), but this doesn't
|
|
|
|
* make sense from a generic API point of view so that's why this is
|
|
|
|
* JS specific.
|
|
|
|
*
|
|
|
|
* This property is "replaceable" in JavaScript.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIDOMWindow frames;
|
2013-05-08 14:16:46 -07:00
|
|
|
|
|
|
|
[implicit_jscontext, binaryname(ScriptableContent)]
|
|
|
|
readonly attribute jsval content;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|