Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIWebNavigation Interface Reference

The nsIWebNavigation interface defines an interface for navigating the web. More...

import "nsIWebNavigation.idl";

Inheritance diagram for nsIWebNavigation:
Inheritance graph
[legend]
Collaboration diagram for nsIWebNavigation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void goBack ()
 Tells the object to navigate to the previous session history item.
void goForward ()
 Tells the object to navigate to the next session history item.
void gotoIndex (in long index)
 Tells the object to navigate to the session history item at a given index.
void loadURI (in wstring aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in nsIInputStream aPostData, in nsIInputStream aHeaders)
 Loads a given URI.
void reload (in unsigned long aReloadFlags)
 Tells the Object to reload the current page.
void stop (in unsigned long aStopFlags)
 Stops a load of a URI.

Public Attributes

readonly attribute boolean canGoBack
 Indicates if the object can go back.
readonly attribute boolean canGoForward
 Indicates if the object can go forward.
const unsigned long LOAD_FLAGS_MASK = 0xffff
 This flags defines the range of bits that may be specified.
const unsigned long LOAD_FLAGS_NONE = 0x0000
 This is the default value for the load flags parameter.
const unsigned long LOAD_FLAGS_IS_REFRESH = 0x0010
 This flag specifies that the load should have the semantics of an HTML META refresh (i.e., that the cache should be validated).
const unsigned long LOAD_FLAGS_IS_LINK = 0x0020
 This flag specifies that the load should have the semantics of a link click.
const unsigned long LOAD_FLAGS_BYPASS_HISTORY = 0x0040
 This flag specifies that history should not be updated.
const unsigned long LOAD_FLAGS_REPLACE_HISTORY = 0x0080
 This flag specifies that any existing history entry should be replaced.
const unsigned long LOAD_FLAGS_BYPASS_CACHE = 0x0100
 This flag specifies that the local web cache should be bypassed, but an intermediate proxy cache could still be used to satisfy the load.
const unsigned long LOAD_FLAGS_BYPASS_PROXY = 0x0200
 This flag specifies that any intermediate proxy caches should be bypassed (i.e., that the content should be loaded from the origin server).
const unsigned long LOAD_FLAGS_CHARSET_CHANGE = 0x0400
 This flag specifies that a reload was triggered as a result of detecting an incorrect character encoding while parsing a previously loaded document.
const unsigned long LOAD_FLAGS_STOP_CONTENT = 0x0800
 If this flag is set, Stop() will be called before the load starts and will stop both content and network activity (the default is to only stop network activity).
const unsigned long LOAD_FLAGS_FROM_EXTERNAL = 0x1000
 A hint this load was prompted by an external program: take care!
const unsigned long LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 0x2000
 This flag specifies that the URI may be submitted to a third-party server for correction.
const unsigned long LOAD_FLAGS_FIRST_LOAD = 0x4000
 This flag specifies that this is the first load in this object.
const unsigned long STOP_NETWORK = 0x01
 This flag specifies that all network activity should be stopped.
const unsigned long STOP_CONTENT = 0x02
 This flag specifies that all content activity should be stopped.
const unsigned long STOP_ALL = 0x03
 This flag specifies that all activity should be stopped.
readonly attribute nsIDOMDocument document
 Retrieves the current DOM document for the frame, or lazily creates a blank document if there is none.
readonly attribute nsIURI currentURI
 The currently loaded URI or null.
readonly attribute nsIURI referringURI
 The referring URI for the currently loaded URI or null.
attribute nsISHistory sessionHistory
 The session history object used by this web navigation instance.

Detailed Description

The nsIWebNavigation interface defines an interface for navigating the web.

It provides methods and attributes to direct an object to navigate to a new location, stop or restart an in process load, or determine where the object has previously gone.

UNDER_REVIEW

Definition at line 56 of file nsIWebNavigation.idl.


Member Function Documentation

Tells the object to navigate to the previous session history item.

When a page is loaded from session history, all content is loaded from the cache (if available) and page state (such as form values and scroll position) is restored.

Exceptions:
NS_ERROR_UNEXPECTEDIndicates that the call was unexpected at this time, which implies that canGoBack is false.

Tells the object to navigate to the next session history item.

When a page is loaded from session history, all content is loaded from the cache (if available) and page state (such as form values and scroll position) is restored.

Exceptions:
NS_ERROR_UNEXPECTEDIndicates that the call was unexpected at this time, which implies that canGoForward is false.

Tells the object to navigate to the session history item at a given index.

Exceptions:
NS_ERROR_UNEXPECTEDIndicates that the call was unexpected at this time, which implies that session history entry at the given index does not exist.
void nsIWebNavigation::loadURI ( in wstring  aURI,
in unsigned long  aLoadFlags,
in nsIURI  aReferrer,
in nsIInputStream  aPostData,
in nsIInputStream  aHeaders 
)

Loads a given URI.

This will give priority to loading the requested URI in the object implementing this interface. If it can't be loaded here however, the URI dispatcher will go through its normal process of content loading.

Parameters:
aURIThe URI string to load. For HTTP and FTP URLs and possibly others, characters above U+007F will be converted to UTF-8 and then URL- escaped per the rules of RFC 2396.
aLoadFlagsFlags modifying load behaviour. This parameter is a bitwise combination of the load flags defined above. (Undefined bits are reserved for future use.) Generally you will pass LOAD_FLAGS_NONE for this parameter.
aReferrerThe referring URI. If this argument is null, then the referring URI will be inferred internally.
aPostDataIf the URI corresponds to a HTTP request, then this stream is appended directly to the HTTP request headers. It may be prefixed with additional HTTP headers. This stream must contain a "\r\n" sequence separating any HTTP headers from the HTTP request body. This parameter is optional and may be null.
aHeadersIf the URI corresponds to a HTTP request, then any HTTP headers contained in this stream are set on the HTTP request. The HTTP header stream is formatted as: ( HEADER "\r\n" )* This parameter is optional and may be null.
void nsIWebNavigation::reload ( in unsigned long  aReloadFlags)

Tells the Object to reload the current page.

There may be cases where the user will be asked to confirm the reload (for example, when it is determined that the request is non-idempotent).

Parameters:
aReloadFlagsFlags modifying load behaviour. This parameter is a bitwise combination of the Load Flags defined above. (Undefined bits are reserved for future use.) Generally you will pass LOAD_FLAGS_NONE for this parameter.
Exceptions:
NS_BINDING_ABORTEDIndicating that the user canceled the reload.
void nsIWebNavigation::stop ( in unsigned long  aStopFlags)

Stops a load of a URI.

Parameters:
aStopFlagsThis parameter is one of the stop flags defined above.

Member Data Documentation

Indicates if the object can go back.

If true this indicates that there is back session history available for navigation.

Definition at line 62 of file nsIWebNavigation.idl.

Indicates if the object can go forward.

If true this indicates that there is forward session history available for navigation

Definition at line 68 of file nsIWebNavigation.idl.

The currently loaded URI or null.

Definition at line 286 of file nsIWebNavigation.idl.

Retrieves the current DOM document for the frame, or lazily creates a blank document if there is none.

This attribute never returns null except for unexpected error situations.

Definition at line 281 of file nsIWebNavigation.idl.

This flag specifies that the URI may be submitted to a third-party server for correction.

This should only be applied to non-sensitive URIs entered by users.

Definition at line 183 of file nsIWebNavigation.idl.

This flag specifies that the local web cache should be bypassed, but an intermediate proxy cache could still be used to satisfy the load.

Definition at line 150 of file nsIWebNavigation.idl.

This flag specifies that history should not be updated.

This flag is only applicable to loadURI.

Definition at line 138 of file nsIWebNavigation.idl.

This flag specifies that any intermediate proxy caches should be bypassed (i.e., that the content should be loaded from the origin server).

Definition at line 156 of file nsIWebNavigation.idl.

This flag specifies that a reload was triggered as a result of detecting an incorrect character encoding while parsing a previously loaded document.

Definition at line 163 of file nsIWebNavigation.idl.

This flag specifies that this is the first load in this object.

Set with care, since setting incorrectly can cause us to assume that nothing was actually loaded in this object if the load ends up being handled by an external application.

Definition at line 191 of file nsIWebNavigation.idl.

A hint this load was prompted by an external program: take care!

Definition at line 176 of file nsIWebNavigation.idl.

This flag specifies that the load should have the semantics of a link click.

This flag is only applicable to loadURI. XXX the meaning of this flag is poorly defined.

Definition at line 132 of file nsIWebNavigation.idl.

This flag specifies that the load should have the semantics of an HTML META refresh (i.e., that the cache should be validated).

This flag is only applicable to loadURI. XXX the meaning of this flag is poorly defined.

Definition at line 125 of file nsIWebNavigation.idl.

This flags defines the range of bits that may be specified.

Definition at line 112 of file nsIWebNavigation.idl.

This is the default value for the load flags parameter.

Definition at line 117 of file nsIWebNavigation.idl.

This flag specifies that any existing history entry should be replaced.

This flag is only applicable to loadURI.

Definition at line 144 of file nsIWebNavigation.idl.

If this flag is set, Stop() will be called before the load starts and will stop both content and network activity (the default is to only stop network activity).

Effectively, this passes the STOP_CONTENT flag to Stop(), in addition to the STOP_NETWORK flag.

Definition at line 171 of file nsIWebNavigation.idl.

The referring URI for the currently loaded URI or null.

Definition at line 291 of file nsIWebNavigation.idl.

The session history object used by this web navigation instance.

Definition at line 296 of file nsIWebNavigation.idl.

This flag specifies that all activity should be stopped.

Definition at line 266 of file nsIWebNavigation.idl.

This flag specifies that all content activity should be stopped.

This includes animated images, plugins and pending Javascript timeouts.

Definition at line 261 of file nsIWebNavigation.idl.

This flag specifies that all network activity should be stopped.

This includes both active network loads and pending META-refreshes.

Definition at line 255 of file nsIWebNavigation.idl.


The documentation for this interface was generated from the following file: