Interface nsIWebBrowserType

The nsIWebBrowser interface is implemented by web browser objects. Embedders use this interface during initialisation to associate the new web browser instance with the embedders chrome and to register any listeners. The interface may also be used at runtime to obtain the content DOM window and from that the rest of the DOM.

Hierarchy

Properties

containerWindow: nsIWebBrowserChrome

The chrome object associated with the browser instance. The embedder must create one chrome object for each browser object that is instantiated. The embedder must associate the two by setting this property to point to the chrome object before creating the browser window via the browser's nsIBaseWindow interface.

The chrome may optionally implement nsIInterfaceRequestor, nsIWebBrowserChromeFocus, nsIContextMenuListener and nsITooltipListener to receive additional notifications from the browser object.

The chrome object may optionally implement nsIWebProgressListener to register a progress listener object. If the implementation does this, it must also implement nsIWeakReference.

Note

The implementation should not refcount the supplied chrome object; it should assume that a non nullptr value is always valid. The embedder must explicitly set this value back to nullptr if the chrome object is destroyed before the browser object.

See

  • nsIBaseWindow
  • nsIWebBrowserChrome
  • nsIInterfaceRequestor
  • nsIWebBrowserChromeFocus
  • nsIContextMenuListener
  • nsITooltipListener
  • nsIWeakReference
  • nsIWebProgressListener
contentDOMWindow: mozIDOMWindowProxy

The top-level DOM window. The embedder may walk the entire DOM starting from this value.

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

  • Set Origin Attributes on the nsIWebBrowser. The Origin Attributes will be passed to the docshell once it has been created

    Parameters

    • aOriginAttrs: const_OriginAttributesRef

    Returns void

Generated using TypeDoc