Interface nsIWebProgressType

The nsIWebProgress interface is used to add or remove nsIWebProgressListener instances to observe the loading of asynchronous requests (usually in the context of a DOM window).

nsIWebProgress instances may be arranged in a parent-child configuration, corresponding to the parent-child configuration of their respective DOM windows. However, in some cases a nsIWebProgress instance may not have an associated DOM window. The parent-child relationship of nsIWebProgress instances is not made explicit by this interface, but the relationship may exist in some implementations.

A nsIWebProgressListener instance receives notifications for the nsIWebProgress instance to which it added itself, and it may also receive notifications from any nsIWebProgress instances that are children of that nsIWebProgress instance.

Hierarchy

Properties

DOMWindow: mozIDOMWindowProxy

The DOM window associated with this nsIWebProgress instance.

Throw

NS_ERROR_FAILURE Indicates that there is no associated DOM window.

browsingContext: BrowsingContext

BrowsingContext associated with this nsIWebProgress instance, or null if there is no BrowsingContext.

documentRequest: nsIRequest

The request for the currently loading document. It is null if isLoadingDocument is false. Note, the request may not be the actual nsIChannel instance used for loading, but a dummy RemoteWebProgressRequest. And since redirects are hidden from the child processes, this may not reflect the complete redirect state of the load.

isLoadingDocument: boolean

Indicates whether or not a document is currently being loaded in the context of this nsIWebProgress instance.

isTopLevel: boolean

Indicates whether DOMWindow.top == DOMWindow.

loadType: number

Contains a load type as specified by the load* constants in nsIDocShell:LoadCommand.

target: nsIEventTarget

Main thread event target to which progress updates should be dispatched. This typically will be a SchedulerEventTarget corresponding to the tab requesting updates.

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

  • Registers a listener to receive web progress events.

    Throw

    NS_ERROR_INVALID_ARG Indicates that aListener was either null or that it does not support weak references.

    Throw

    NS_ERROR_FAILURE Indicates that aListener was already registered.

    Parameters

    • aListener: nsIWebProgressListener

      The listener interface to be called when a progress event occurs. This object must also implement nsISupportsWeakReference.

    • aNotifyMask: number

      The types of notifications to receive.

    Returns void

  • Returns BrowsingContext

  • Removes a previously registered listener of progress events.

    Throw

    NS_ERROR_FAILURE Indicates that aListener was not registered.

    Parameters

    • aListener: nsIWebProgressListener

      The listener interface previously registered with a call to addProgressListener.

    Returns void

Generated using TypeDoc