Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "domstubs.idl" |
michael@0 | 7 | |
michael@0 | 8 | [scriptable, uuid(4237c376-d637-4b6e-9f8a-1da57e867834)] |
michael@0 | 9 | interface nsIDOMJSWindow : nsISupports |
michael@0 | 10 | { |
michael@0 | 11 | void dump(in DOMString str); |
michael@0 | 12 | |
michael@0 | 13 | /** |
michael@0 | 14 | * These methods take typeless arguments and optional arguments, the |
michael@0 | 15 | * first argument is either a function or a string, the second |
michael@0 | 16 | * argument must be a number (ms) and the rest of the arguments (2 |
michael@0 | 17 | * ... n) are passed to the callback function |
michael@0 | 18 | */ |
michael@0 | 19 | long setTimeout(); |
michael@0 | 20 | long setInterval(); |
michael@0 | 21 | |
michael@0 | 22 | /** |
michael@0 | 23 | * These methods take one optional argument that's the timer ID to |
michael@0 | 24 | * clear. Often in existing code these methods are passed undefined, |
michael@0 | 25 | * which is a nop so we need to support that as well. |
michael@0 | 26 | */ |
michael@0 | 27 | void clearTimeout([optional] in long handle); |
michael@0 | 28 | void clearInterval([optional] in long handle); |
michael@0 | 29 | |
michael@0 | 30 | /** |
michael@0 | 31 | * This method is here for backwards compatibility with 4.x only, |
michael@0 | 32 | * its implementation is a no-op |
michael@0 | 33 | */ |
michael@0 | 34 | void setResizable(in boolean resizable); |
michael@0 | 35 | |
michael@0 | 36 | /** |
michael@0 | 37 | * @deprecated These are old Netscape 4 methods. Do not use, |
michael@0 | 38 | * the implementation is no-op. |
michael@0 | 39 | */ |
michael@0 | 40 | void captureEvents(); |
michael@0 | 41 | void releaseEvents(); |
michael@0 | 42 | |
michael@0 | 43 | /** |
michael@0 | 44 | * This is the scriptable version of nsIDOMWindow::open() |
michael@0 | 45 | * that takes 3 optional arguments. Its binary name is OpenJS to |
michael@0 | 46 | * avoid colliding with nsIDOMWindow::open(), which has the |
michael@0 | 47 | * same signature. The reason we can't have that collision is that |
michael@0 | 48 | * the implementation needs to know whether it was called from JS or |
michael@0 | 49 | * not. |
michael@0 | 50 | * |
michael@0 | 51 | * IOW, DO NOT CALL THIS FROM C++ |
michael@0 | 52 | */ |
michael@0 | 53 | [binaryname(OpenJS)] nsIDOMWindow open([optional] in DOMString url, |
michael@0 | 54 | [optional] in DOMString name, |
michael@0 | 55 | [optional] in DOMString options); |
michael@0 | 56 | |
michael@0 | 57 | /** |
michael@0 | 58 | * This is the scriptable version of |
michael@0 | 59 | * nsIDOMWindow::openDialog() that takes 3 optional |
michael@0 | 60 | * arguments, plus any additional arguments are passed on as |
michael@0 | 61 | * arguments on the dialog's window object (window.arguments). |
michael@0 | 62 | */ |
michael@0 | 63 | nsIDOMWindow openDialog([optional] in DOMString url, |
michael@0 | 64 | [optional] in DOMString name, |
michael@0 | 65 | [optional] in DOMString options); |
michael@0 | 66 | |
michael@0 | 67 | /** |
michael@0 | 68 | * window.frames in Netscape 4.x and IE is just a reference to the |
michael@0 | 69 | * window itself (i.e. window.frames === window), but this doesn't |
michael@0 | 70 | * make sense from a generic API point of view so that's why this is |
michael@0 | 71 | * JS specific. |
michael@0 | 72 | * |
michael@0 | 73 | * This property is "replaceable" in JavaScript. |
michael@0 | 74 | */ |
michael@0 | 75 | readonly attribute nsIDOMWindow frames; |
michael@0 | 76 | |
michael@0 | 77 | [implicit_jscontext, binaryname(ScriptableContent)] |
michael@0 | 78 | readonly attribute jsval content; |
michael@0 | 79 | }; |