nsIWebProgress

IID:570F39D0-EFD0-11d3-B093-00A024FFC08C
Inherits From:nsISupports
Status:FROZEN

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.

This interface is implemented by the following components:


Constants

These flags indicate the state transistions to observe, corresponding to nsIWebProgressListener::onStateChange.

NOTIFY_STATE_REQUEST Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_REQUEST.

NOTIFY_STATE_DOCUMENT Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_DOCUMENT.

NOTIFY_STATE_NETWORK Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_NETWORK.

NOTIFY_STATE_WINDOW Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_WINDOW.

NOTIFY_STATE_ALL Receive all onStateChange events.

PRUint32 NOTIFY_STATE_REQUEST = 1
PRUint32 NOTIFY_STATE_DOCUMENT = 2
PRUint32 NOTIFY_STATE_NETWORK = 4
PRUint32 NOTIFY_STATE_WINDOW = 8
PRUint32 NOTIFY_STATE_ALL = 15
These flags indicate the other events to observe, corresponding to the other four methods defined on nsIWebProgressListener.

NOTIFY_PROGRESS Receive onProgressChange events.

NOTIFY_STATUS Receive onStatusChange events.

NOTIFY_SECURITY Receive onSecurityChange events.

NOTIFY_LOCATION Receive onLocationChange events.

PRUint32 NOTIFY_PROGRESS = 16
PRUint32 NOTIFY_STATUS = 32
PRUint32 NOTIFY_SECURITY = 64
PRUint32 NOTIFY_LOCATION = 128
This flag enables all notifications.
PRUint32 NOTIFY_ALL = 255

Properties

readonly nsIDOMWindow DOMWindow

The DOM window associated with this nsIWebProgress instance.

readonly PRBool isLoadingDocument

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


Methods

void addProgressListener ( nsIWebProgressListener listener , PRUint32 notifyMask ) void removeProgressListener ( nsIWebProgressListener listener )

void addProgressListener ( nsIWebProgressListener listener , PRUint32 notifyMask )

Registers a listener to receive web progress events.

Arguments:
listener: The listener interface to be called when a progress event occurs. This object must also implement nsISupportsWeakReference.
notifyMask: The types of notifications to receive.

void removeProgressListener ( nsIWebProgressListener listener )

Removes a previously registered listener of progress events.

Arguments:
listener: The listener interface previously registered with a call to addProgressListener.

References

This interface is passed as an argument to the following methods:

nsIDownloadProgressListener.onLocationChange, nsIDownloadProgressListener.onProgressChange, nsIDownloadProgressListener.onSecurityChange, nsIDownloadProgressListener.onStateChange, nsIDownloadProgressListener.onStatusChange, nsIWebProgressListener.onLocationChange, nsIWebProgressListener.onProgressChange, nsIWebProgressListener.onSecurityChange, nsIWebProgressListener.onStateChange, nsIWebProgressListener.onStatusChange, nsIWebProgressListener2.onProgressChange64

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com