|
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
|
2 * |
|
3 * This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #include "nsISupports.idl" |
|
8 |
|
9 /** |
|
10 * The nsIWebBrowserSetup interface lets you set properties on a browser |
|
11 * object; you can do so at any time during the life cycle of the browser. |
|
12 * |
|
13 * @note Unless stated otherwise, settings are presumed to be enabled by |
|
14 * default. |
|
15 */ |
|
16 [scriptable, uuid(F15398A0-8018-11d3-AF70-00A024FFC08C)] |
|
17 interface nsIWebBrowserSetup : nsISupports |
|
18 { |
|
19 /** |
|
20 * Boolean. Enables/disables plugin support for this browser. |
|
21 * |
|
22 * @see setProperty |
|
23 */ |
|
24 const unsigned long SETUP_ALLOW_PLUGINS = 1; |
|
25 |
|
26 /** |
|
27 * Boolean. Enables/disables Javascript support for this browser. |
|
28 * |
|
29 * @see setProperty |
|
30 */ |
|
31 const unsigned long SETUP_ALLOW_JAVASCRIPT = 2; |
|
32 |
|
33 /** |
|
34 * Boolean. Enables/disables meta redirect support for this browser. |
|
35 * Meta redirect timers will be ignored if this option is disabled. |
|
36 * |
|
37 * @see setProperty |
|
38 */ |
|
39 const unsigned long SETUP_ALLOW_META_REDIRECTS = 3; |
|
40 |
|
41 /** |
|
42 * Boolean. Enables/disables subframes within the browser |
|
43 * |
|
44 * @see setProperty |
|
45 */ |
|
46 const unsigned long SETUP_ALLOW_SUBFRAMES = 4; |
|
47 |
|
48 /** |
|
49 * Boolean. Enables/disables image loading for this browser |
|
50 * window. If you disable the images, load a page, then enable the images, |
|
51 * the page will *not* automatically load the images for the previously |
|
52 * loaded page. This flag controls the state of a webBrowser at load time |
|
53 * and does not automatically re-load a page when the state is toggled. |
|
54 * Reloading must be done by hand, or by walking through the DOM tree and |
|
55 * re-setting the src attributes. |
|
56 * |
|
57 * @see setProperty |
|
58 */ |
|
59 const unsigned long SETUP_ALLOW_IMAGES = 5; |
|
60 |
|
61 /** |
|
62 * Boolean. Enables/disables whether the document as a whole gets focus before |
|
63 * traversing the document's content, or after traversing its content. |
|
64 * |
|
65 * NOTE: this property is obsolete and now has no effect |
|
66 * |
|
67 * @see setProperty |
|
68 */ |
|
69 const unsigned long SETUP_FOCUS_DOC_BEFORE_CONTENT = 6; |
|
70 |
|
71 /** |
|
72 * Boolean. Enables/disables the use of global history in the browser. Visited |
|
73 * URLs will not be recorded in the global history when it is disabled. |
|
74 * |
|
75 * @see setProperty |
|
76 */ |
|
77 const unsigned long SETUP_USE_GLOBAL_HISTORY = 256; |
|
78 |
|
79 /** |
|
80 * Boolean. A value of PR_TRUE makes the browser a chrome wrapper. |
|
81 * Default is PR_FALSE. |
|
82 * |
|
83 * @since mozilla1.0 |
|
84 * |
|
85 * @see setProperty |
|
86 */ |
|
87 const unsigned long SETUP_IS_CHROME_WRAPPER = 7; |
|
88 |
|
89 |
|
90 /** |
|
91 * Boolean. Enables/disables DNS prefetch for HTML anchors in this browser. |
|
92 * This takes effect starting with the next pageload after the property is |
|
93 * set. The default is to not allow DNS prefetch, for backwards |
|
94 * compatibility. |
|
95 * |
|
96 * @see setProperty |
|
97 */ |
|
98 const unsigned long SETUP_ALLOW_DNS_PREFETCH = 8; |
|
99 |
|
100 /** |
|
101 * Sets an integer or boolean property on the new web browser object. |
|
102 * Only PR_TRUE and PR_FALSE are legal boolean values. |
|
103 * |
|
104 * @param aId The identifier of the property to be set. |
|
105 * @param aValue The value of the property. |
|
106 */ |
|
107 void setProperty(in unsigned long aId, in unsigned long aValue); |
|
108 }; |
|
109 |