michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "domstubs.idl" michael@0: michael@0: [scriptable, uuid(4237c376-d637-4b6e-9f8a-1da57e867834)] michael@0: interface nsIDOMJSWindow : nsISupports michael@0: { michael@0: void dump(in DOMString str); michael@0: michael@0: /** michael@0: * These methods take typeless arguments and optional arguments, the michael@0: * first argument is either a function or a string, the second michael@0: * argument must be a number (ms) and the rest of the arguments (2 michael@0: * ... n) are passed to the callback function michael@0: */ michael@0: long setTimeout(); michael@0: long setInterval(); michael@0: michael@0: /** michael@0: * These methods take one optional argument that's the timer ID to michael@0: * clear. Often in existing code these methods are passed undefined, michael@0: * which is a nop so we need to support that as well. michael@0: */ michael@0: void clearTimeout([optional] in long handle); michael@0: void clearInterval([optional] in long handle); michael@0: michael@0: /** michael@0: * This method is here for backwards compatibility with 4.x only, michael@0: * its implementation is a no-op michael@0: */ michael@0: void setResizable(in boolean resizable); michael@0: michael@0: /** michael@0: * @deprecated These are old Netscape 4 methods. Do not use, michael@0: * the implementation is no-op. michael@0: */ michael@0: void captureEvents(); michael@0: void releaseEvents(); michael@0: michael@0: /** michael@0: * This is the scriptable version of nsIDOMWindow::open() michael@0: * that takes 3 optional arguments. Its binary name is OpenJS to michael@0: * avoid colliding with nsIDOMWindow::open(), which has the michael@0: * same signature. The reason we can't have that collision is that michael@0: * the implementation needs to know whether it was called from JS or michael@0: * not. michael@0: * michael@0: * IOW, DO NOT CALL THIS FROM C++ michael@0: */ michael@0: [binaryname(OpenJS)] nsIDOMWindow open([optional] in DOMString url, michael@0: [optional] in DOMString name, michael@0: [optional] in DOMString options); michael@0: michael@0: /** michael@0: * This is the scriptable version of michael@0: * nsIDOMWindow::openDialog() that takes 3 optional michael@0: * arguments, plus any additional arguments are passed on as michael@0: * arguments on the dialog's window object (window.arguments). michael@0: */ michael@0: nsIDOMWindow openDialog([optional] in DOMString url, michael@0: [optional] in DOMString name, michael@0: [optional] in DOMString options); michael@0: michael@0: /** michael@0: * window.frames in Netscape 4.x and IE is just a reference to the michael@0: * window itself (i.e. window.frames === window), but this doesn't michael@0: * make sense from a generic API point of view so that's why this is michael@0: * JS specific. michael@0: * michael@0: * This property is "replaceable" in JavaScript. michael@0: */ michael@0: readonly attribute nsIDOMWindow frames; michael@0: michael@0: [implicit_jscontext, binaryname(ScriptableContent)] michael@0: readonly attribute jsval content; michael@0: };