Readonly
canIndicates if the object can go back. If true this indicates that there is back session history available for navigation.
Readonly
canIndicates if the object can go forward. If true this indicates that there is forward session history available for navigation
Readonly
currentURIThe currently loaded URI or null.
Readonly
documentRetrieves 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.
Readonly
sessionThe session history object used by this web navigation instance. This object will be a mozilla::dom::ChildSHistory object, but is returned as nsISupports so it can be called from JS code.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Parse / fix up a URI out of the string and load it. 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.
The 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.
This method may use nsIURIFixup to try to fix up typos etc. in the
input string based on the load flag arguments in aLoadURIOptions.
It can even convert the input to a search results page using the
default search service.
If you have an nsIURI anyway, prefer calling loadURI
, above.
A JSObject defined in LoadURIOptions.webidl holding info like e.g. the triggeringPrincipal, the referrer info.
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.
NS_ERROR_UNEXPECTED Indicates that the call was unexpected at this time, which implies that canGoBack is false.
Tells goBack to skip history items that did not record any user interaction on their corresponding document while they were active. This means in case of multiple entries mapping to the same document, each entry has to have been flagged with user interaction separately. If no items have user interaction, the function will fall back to the first session history entry.
Tells goBack that the call was triggered by a user action (e.g.: The user clicked the back button).
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.
NS_ERROR_UNEXPECTED Indicates that the call was unexpected at this time, which implies that canGoForward is false.
Tells goForward to skip history items that did not record any user interaction on their corresponding document while they were active. This means in case of multiple entries mapping to the same document, each entry has to have been flagged with user interaction separately. If no items have user interaction, the function will fall back to the latest session history entry.
Tells goForward that the call was triggered by a user action (e.g.: The user clicked the forward button).
Tells the object to navigate to the session history item at a given index.
NS_ERROR_UNEXPECTED Indicates that the call was unexpected at this time, which implies that session history entry at the given index does not exist.
Tells goForward that the call was triggered by a user action (e.g.: The user clicked the forward button).
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.
The URI to load.
A JSObject defined in LoadURIOptions.webidl holding info like e.g. the triggeringPrincipal, the referrer info.
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).
NS_BINDING_ABORTED Indicating that the user canceled the reload.
Flags 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.
Generated using TypeDoc
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.
Even though this is builtinclass, most of the interface is also implemented in RemoteWebNavigation, so if this interface changes, the implementation there may also need to change.