You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.


TOC PREV NEXT INDEX

Embedding Gecko API


nsIWebBrowserSetup


This interface allows certain properties of a new browser object to be set before the browser window is opened. This interface is scriptable.

Note: Unless stated otherwise, settings are presumed to be enabled by default.

Methods
setProperty

Sets an integer or boolean property on the new web browser object. Only PR_TRUE and PR_FALSE are legal boolean values.

Syntax:

void setProperty (in unsigned long aId, in unsigned long
	aValue) 

Parameters:

aId: The identifier of the property to be set.
aValue: The value of the property.

See Constants below for available properties and values.

nsresult:

NS_OK if successful
Constants
const unsigned long nsIWebBrowserSetup::SETUP_ALLOW_PLUGINS=1

Boolean. Enables/disables plugin support for this browser.

const unsigned long nsIWebBrowserSetup::SETUP_ALLOW_JAVASCRIPT=2

Boolean. Enables/disables Javascript support for this browser.

const unsigned long nsIWebBrowserSetup::SETUP_ALLOW_META_REDIRECTS= 3

Boolean. Enables/disables meta redirect support for this browser. Meta redirect timers will be ignored if this option is disabled.

const unsigned long nsIWebBrowserSetup::SETUP_ALLOW_SUBFRAMES=4

Boolean. Enables/disables subframes within the browser.

const unsigned long nsIWebBrowserSetup::SETUP_ALLOW_IMAGES=5

Boolean. Enables/disables image loading for this browser window.

If images are disabled, a page is loaded, and then images are enabled, the page will not automatically load the images for the previously loaded page. This flag controls the state of a WebBrowser at load time and does not automatically re-load a page when the state is toggled. Reloading must be done by hand, or by walking through the DOM tree and re-setting the src attributes.

const unsigned long nsIWebBrowserSetup::SETUP_FOCUS_DOC_BEFORE_CONTENT=6

This property is obsolete.

const unsigned long nsIWebBrowserSetup::SETUP_USE_GLOBAL_HISTORY=256

Boolean. Enables/disables the use of global history in the browser. Visited URLs are not recorded in the global history when it is disabled.

const unsigned long nsIWebBrowserSetup::SETUP_IS_CHROME_WRAPPER=7

Boolean. Marks whether the browser is a chrome wrapper. A value of PR_TRUE means the browser is a chrome wrapper. The default value is PR_FALSE.

Note: This attribute was added with mozilla 1.0


Written by:Ellen Evans | Comments, questions, complaints? Bug 143387
TOC PREV NEXT INDEX