This component implements the following interfaces:


Error codes when we fail to create an editor is placed in attribute editorStatus
PRInt32 nsIEditingSession.eEditorOK = 0
PRInt32 nsIEditingSession.eEditorCreationInProgress = 1
PRInt32 nsIEditingSession.eEditorErrorCantEditMimeType = 2
PRInt32 nsIEditingSession.eEditorErrorFileNotFound = 3
PRInt32 nsIEditingSession.eEditorErrorCantEditFramesets = 8
PRInt32 nsIEditingSession.eEditorErrorUnknown = 9
State Transition Flags

These flags indicate the various states that documents and requests may transition through as they are being loaded. These flags are mutually exclusive.

STATE_START This flag indicates the start of a request.

STATE_REDIRECTING This flag indicates that a request 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.

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 (e.g., this includes inline image requests and stylesheets).

STATE_IS_DOCUMENT This flag indicates that the state transition is for a document request, which includes documents in sub-frames.

STATE_IS_NETWORK This flag indicates that the state transition corresponds to a toplevel document, and is accompanied by either STATE_START or STATE_STOP. This flag can be used to determine when an entire frameset finishes loading.

STATE_IS_WINDOW This flag indicates that the state transition corresponds to a DOM window. (Each nsIWebProgress instance has an associated nsIDOMWindow.) This flag is accompanied by either STATE_START or STATE_STOP.

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 Security Flags

A combination of these flags comprises the aState parameter 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
PRUint32 nsIWebProgressListener.STATE_SECURE_HIGH = 262144
PRUint32 nsIWebProgressListener.STATE_SECURE_MED = 65536
PRUint32 nsIWebProgressListener.STATE_SECURE_LOW = 131072


readonly PRUint32 nsIEditingSession.editorStatus

Status after editor creation and document loading Value is one of the above error codes


nsIEditingSession nsIEditor getEditorForWindow ( nsIDOMWindow window )
nsISupportsWeakReference nsIWeakReference GetWeakReference ( )
nsIEditingSession void init ( nsIDOMWindow window )
nsIEditingSession void makeWindowEditable ( nsIDOMWindow window , char* editorType , PRBool doAfterUriLoad )
nsIWebProgressListener void onLocationChange ( nsIWebProgress webProgress , nsIRequest request , nsIURI location )
nsIWebProgressListener void onProgressChange ( nsIWebProgress webProgress , nsIRequest request , PRInt32 curSelfProgress , PRInt32 maxSelfProgress , PRInt32 curTotalProgress , PRInt32 maxTotalProgress )
nsIWebProgressListener void onSecurityChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 state )
nsIWebProgressListener void onStateChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 stateFlags , nsresult status )
nsIWebProgressListener void onStatusChange ( nsIWebProgress webProgress , nsIRequest request , nsresult status , PRUnichar* message )
nsIEditingSession void setEditorOnControllers ( nsIDOMWindow window , nsIEditor editor )
nsIEditingSession void setupEditorOnWindow ( nsIDOMWindow window )
nsIEditingSession void tearDownEditorOnWindow ( nsIDOMWindow window )
nsIEditingSession PRBool windowIsEditable ( nsIDOMWindow window )

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com