Interface nsIWindowlessBrowserType

This interface represents a nsIWebBrowser instance with no associated OS window. Its main function is to manage the lifetimes of those windows. A strong reference to this object must be held until the window is ready to be destroyed.

Hierarchy

Properties

browsingContext: BrowsingContext

Get the Browsing Context for this browser. This is the Browsing Context that owns the docshell used for navigation.

canGoBack: boolean

Indicates if the object can go back. If true this indicates that there is back session history available for navigation.

canGoForward: boolean

Indicates if the object can go forward. If true this indicates that there is forward session history available for navigation

currentURI: nsIURI

The currently loaded URI or null.

docShell: nsIDocShell

Get the docshell for this browser. This is the docshell that gets navigated when the browser's nsIWebNavigation interface is used.

document: Document

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.

sessionHistory: nsISupports

The 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.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • A C++ friendly version of fixupAndLoadURIString

    Parameters

    • aURIString: string
    • aLoadURIOptions: LoadURIOptionsRef

    Returns void

  • A C++ friendly version of loadURI

    Parameters

    • aURI: nsIURI
    • aLoadURIOptions: LoadURIOptionsRef

    Returns void

  • "Closes" the windowless browser and destroys its associated nsIWebBrowser and docshell.

    This method must be called for every windowless browser before its last reference is released.

    Returns void

  • 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.

    Parameters

    • aURIString: string

      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.

    • aLoadURIOptions: any

      A JSObject defined in LoadURIOptions.webidl holding info like e.g. the triggeringPrincipal, the referrer info.

    Returns void

  • 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.

    Throw

    NS_ERROR_UNEXPECTED Indicates that the call was unexpected at this time, which implies that canGoBack is false.

    Parameters

    • aRequireUserInteraction: boolean

      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.

    • aUserActivation: boolean

      Tells goBack that the call was triggered by a user action (e.g.: The user clicked the back button).

    Returns void

  • 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.

    Throw

    NS_ERROR_UNEXPECTED Indicates that the call was unexpected at this time, which implies that canGoForward is false.

    Parameters

    • aRequireUserInteraction: boolean

      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.

    • aUserActivation: boolean

      Tells goForward that the call was triggered by a user action (e.g.: The user clicked the forward button).

    Returns void

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

    Throw

    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.

    Parameters

    • index: number
    • aUserActivation: boolean

      Tells goForward that the call was triggered by a user action (e.g.: The user clicked the forward button).

    Returns void

  • 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

    • aURI: nsIURI

      The URI to load.

    • aLoadURIOptions: any

      A JSObject defined in LoadURIOptions.webidl holding info like e.g. the triggeringPrincipal, the referrer info.

    Returns void

  • 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).

    Throw

    NS_BINDING_ABORTED Indicating that the user canceled the reload.

    Parameters

    • aReloadFlags: number

      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.

    Returns void

  • Resume a load which has been redirected from another process.

    A negative |aHistoryIndex| value corresponds to a non-history load being resumed.

    Parameters

    • aLoadIdentifier: number
    • aHistoryIndex: number

    Returns void

  • Stops a load of a URI.

    Parameters

    • aStopFlags: number

      This parameter is one of the stop flags defined above.

    Returns void

Generated using TypeDoc