| 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 |
nsIWebProgress.NOTIFY_STATE_REQUEST |
= 1 |
| PRUint32 |
nsIWebProgress.NOTIFY_STATE_DOCUMENT |
= 2 |
| PRUint32 |
nsIWebProgress.NOTIFY_STATE_NETWORK |
= 4 |
| PRUint32 |
nsIWebProgress.NOTIFY_STATE_WINDOW |
= 8 |
| PRUint32 |
nsIWebProgress.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.
NOTIFY_REFRESH
Receive onRefreshAttempted events.
This is defined on nsIWebProgressListener2.
|
| PRUint32 |
nsIWebProgress.NOTIFY_PROGRESS |
= 16 |
| PRUint32 |
nsIWebProgress.NOTIFY_STATUS |
= 32 |
| PRUint32 |
nsIWebProgress.NOTIFY_SECURITY |
= 64 |
| PRUint32 |
nsIWebProgress.NOTIFY_LOCATION |
= 128 |
| PRUint32 |
nsIWebProgress.NOTIFY_REFRESH |
= 256 |
| This flag enables all notifications.
|
| PRUint32 |
nsIWebProgress.NOTIFY_ALL |
= 511 |
| State Transition Flags
These flags indicate the various states that requests may transition
through as they are being loaded. These flags are mutually exclusive.
For any given request, onStateChange is called once with the STATE_START
flag, zero or more times with the STATE_TRANSFERRING flag or once with the
STATE_REDIRECTING flag, and then finally once with the STATE_STOP flag.
NOTE: For document requests, a second STATE_STOP is generated (see the
description of STATE_IS_WINDOW for more details).
STATE_START
This flag indicates the start of a request. This flag is set when a
request is initiated. The request is complete when onStateChange is
called for the same request with the STATE_STOP flag set.
STATE_REDIRECTING
This flag indicates that a request is being redirected. The request
passed to onStateChange is the request that is being redirected. When a
redirect occurs, a new request is generated automatically to process the
new request. Expect a corresponding STATE_START event for the new
request, and a STATE_STOP for the redirected request.
STATE_TRANSFERRING
This flag indicates that data for a request is being transferred to an
end consumer. This flag indicates that the request has been targeted,
and that the user may start seeing content corresponding to the request.
STATE_NEGOTIATING
This flag is not used.
STATE_STOP
This flag indicates the completion of a request. The aStatus parameter
to onStateChange indicates the final status of the request.
|
| PRUint32 |
nsIWebProgressListener.STATE_START |
= 1 |
| PRUint32 |
nsIWebProgressListener.STATE_REDIRECTING |
= 2 |
| PRUint32 |
nsIWebProgressListener.STATE_TRANSFERRING |
= 4 |
| PRUint32 |
nsIWebProgressListener.STATE_NEGOTIATING |
= 8 |
| PRUint32 |
nsIWebProgressListener.STATE_STOP |
= 16 |
| State Type Flags
These flags further describe the entity for which the state transition is
occuring. These flags are NOT mutually exclusive (i.e., an onStateChange
event may indicate some combination of these flags).
STATE_IS_REQUEST
This flag indicates that the state transition is for a request, which
includes but is not limited to document requests. (See below for a
description of document requests.) Other types of requests, such as
requests for inline content (e.g., images and stylesheets) are
considered normal requests.
STATE_IS_DOCUMENT
This flag indicates that the state transition is for a document request.
This flag is set in addition to STATE_IS_REQUEST. A document request
supports the nsIChannel interface and its loadFlags attribute includes
the nsIChannel::LOAD_DOCUMENT_URI flag.
A document request does not complete until all requests associated with
the loading of its corresponding document have completed. This includes
other document requests (e.g., corresponding to HTML iframe elements).
The document corresponding to a document request is available via the
DOMWindow attribute of onStateChange's aWebProgress parameter.
STATE_IS_NETWORK
This flag indicates that the state transition corresponds to the start
or stop of activity in the indicated nsIWebProgress instance. This flag
is accompanied by either STATE_START or STATE_STOP, and it may be
combined with other State Type Flags.
Unlike STATE_IS_WINDOW, this flag is only set when activity within the
nsIWebProgress instance being observed starts or stops. If activity
only occurs in a child nsIWebProgress instance, then this flag will be
set to indicate the start and stop of that activity.
For example, in the case of navigation within a single frame of a HTML
frameset, a nsIWebProgressListener instance attached to the
nsIWebProgress of the frameset window will receive onStateChange calls
with the STATE_IS_NETWORK flag set to indicate the start and stop of
said navigation. In other words, an observer of an outer window can
determine when activity, that may be constrained to a child window or
set of child windows, starts and stops.
STATE_IS_WINDOW
This flag indicates that the state transition corresponds to the start
or stop of activity in the indicated nsIWebProgress instance. This flag
is accompanied by either STATE_START or STATE_STOP, and it may be
combined with other State Type Flags.
This flag is similar to STATE_IS_DOCUMENT. However, when a document
request completes, two onStateChange calls with STATE_STOP are
generated. The document request is passed as aRequest to both calls.
The first has STATE_IS_REQUEST and STATE_IS_DOCUMENT set, and the second
has the STATE_IS_WINDOW flag set (and possibly the STATE_IS_NETWORK flag
set as well -- see above for a description of when the STATE_IS_NETWORK
flag may be set). This second STATE_STOP event may be useful as a way
to partition the work that occurs when a document request completes.
|
| PRUint32 |
nsIWebProgressListener.STATE_IS_REQUEST |
= 65536 |
| PRUint32 |
nsIWebProgressListener.STATE_IS_DOCUMENT |
= 131072 |
| PRUint32 |
nsIWebProgressListener.STATE_IS_NETWORK |
= 262144 |
| PRUint32 |
nsIWebProgressListener.STATE_IS_WINDOW |
= 524288 |
| State Modifier Flags
These flags further describe the transition which is occuring. These
flags are NOT mutually exclusive (i.e., an onStateChange event may
indicate some combination of these flags).
STATE_RESTORING
This flag indicates that the state transition corresponds to the start
or stop of activity for restoring a previously-rendered presentation.
As such, there is no actual network activity associated with this
request, and any modifications made to the document or presentation
when it was originally loaded will still be present.
|
| PRUint32 |
nsIWebProgressListener.STATE_RESTORING |
= 16777216 |
| State Security Flags
These flags describe the security state reported by a call to the
onSecurityChange method. These flags are mutually exclusive.
STATE_IS_INSECURE
This flag indicates that the data corresponding to the request
was received over an insecure channel.
STATE_IS_BROKEN
This flag indicates an unknown security state. This may mean that the
request is being loaded as part of a page in which some content was
received over an insecure channel.
STATE_IS_SECURE
This flag indicates that the data corresponding to the request was
received over a secure channel. The degree of security is expressed by
STATE_SECURE_HIGH, STATE_SECURE_MED, or STATE_SECURE_LOW.
|
| PRUint32 |
nsIWebProgressListener.STATE_IS_INSECURE |
= 4 |
| PRUint32 |
nsIWebProgressListener.STATE_IS_BROKEN |
= 1 |
| PRUint32 |
nsIWebProgressListener.STATE_IS_SECURE |
= 2 |
| Security Strength Flags
These flags describe the security strength and accompany STATE_IS_SECURE
in a call to the onSecurityChange method. These flags are mutually
exclusive.
These flags are not meant to provide a precise description of data
transfer security. These are instead intended as a rough indicator that
may be used to, for example, color code a security indicator or otherwise
provide basic data transfer security feedback to the user.
STATE_SECURE_HIGH
This flag indicates a high degree of security.
STATE_SECURE_MED
This flag indicates a medium degree of security.
STATE_SECURE_LOW
This flag indicates a low degree of security.
|
| PRUint32 |
nsIWebProgressListener.STATE_SECURE_HIGH |
= 262144 |
| PRUint32 |
nsIWebProgressListener.STATE_SECURE_MED |
= 65536 |
| PRUint32 |
nsIWebProgressListener.STATE_SECURE_LOW |
= 131072 |
| State bits for EV == Extended Validation == High Assurance
These flags describe the level of identity verification
in a call to the onSecurityChange method.
STATE_IDENTITY_EV_TOPLEVEL
The topmost document uses an EV cert.
NOTE: Available since Gecko 1.9
|
| PRUint32 |
nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL |
= 1048576 |