Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Attributes
nsLSParser Class Reference

#include <nsLSParser.h>

Inheritance diagram for nsLSParser:
Inheritance graph
[legend]
Collaboration diagram for nsLSParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsLSParser ()
virtual ~nsLSParser ()
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMLSPARSER
NS_DECL_NSIDOMEVENTTARGET
nsresult 
Init ()
void FireOnLoad ()
nsIXMLHttpRequestXMLHttpRequest ()
nsIDOMDocument parse (in nsIDOMLSInput input) raises (DOMException, LSException)
nsIDOMDocument parseURI (in DOMString uri) raises (DOMException, LSException)
nsIDOMNode parseWithContext (in nsIDOMLSInput input, in nsIDOMNode contextArg, in unsigned short action) raises (DOMException, LSException)
void abort ()
void addEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture)
 This method allows the registration of event listeners on the event target.
void removeEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture)
 This method allows the removal of event listeners from the event target.
boolean dispatchEvent (in nsIDOMEvent evt) raises (DOMException)
 This method allows the dispatch of events into the implementations event model.

Public Attributes

readonly attribute
nsIDOMDOMConfiguration 
domConfig
attribute nsIDOMLSParserFilter filter
readonly attribute boolean async
readonly attribute boolean busy
const unsigned short ACTION_APPEND_AS_CHILDREN = 1
const unsigned short ACTION_REPLACE_CHILDREN = 2
const unsigned short ACTION_INSERT_BEFORE = 3
const unsigned short ACTION_INSERT_AFTER = 4
const unsigned short ACTION_REPLACE = 5

Private Attributes

nsCOMPtr< nsIXMLHttpRequestmXMLHttpRequest
nsCOMPtr< nsIDOMLSParserFiltermFilter
nsCOMArray< nsIDOMEventListenermLoadListeners
nsCOMArray< nsIDOMEventListenermProgressListeners
PRPackedBool mIsAsync

Detailed Description

Definition at line 60 of file nsLSParser.h.


Constructor & Destructor Documentation

Definition at line 64 of file nsLSParser.cpp.

  : mIsAsync(PR_TRUE)
{
}
nsLSParser::~nsLSParser ( ) [virtual]

Definition at line 69 of file nsLSParser.cpp.

{
}

Member Function Documentation

void nsIDOMLSParser::abort ( ) [inherited]
void nsIDOMEventTarget::addEventListener ( in DOMString  type,
in nsIDOMEventListener  listener,
in boolean  useCapture 
) [inherited]

This method allows the registration of event listeners on the event target.

If an EventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.

If multiple identical EventListeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the EventListener to be called twice and since they are discarded they do not need to be removed with the removeEventListener method.

Parameters:
typeThe event type for which the user is registering
listenerThe listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs.
useCaptureIf true, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture.
boolean nsIDOMEventTarget::dispatchEvent ( in nsIDOMEvent  evt) raises (DOMException) [inherited]

This method allows the dispatch of events into the implementations event model.

Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.

Parameters:
evtSpecifies the event type, behavior, and contextual information to be used in processing the event.
Returns:
Indicates whether any of the listeners which handled the event called preventDefault. If preventDefault was called the value is false, else the value is true.
Exceptions:
UNSPECIFIED_EVENT_TYPE_ERR,:Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as null or an empty string will also trigger this exception.

Definition at line 248 of file nsLSParser.cpp.

{
  for (PRInt32 i = 0; i < mLoadListeners.Count(); ++i) {
    nsRefPtr<nsLSParserLoadEvent> event = new nsLSParserLoadEvent(this);

    if (event) {
      mLoadListeners.ObjectAt(i)->HandleEvent(NS_STATIC_CAST(nsLSEvent *,
                                                             event));
    }
  }
}

Here is the call graph for this function:

Definition at line 261 of file nsLSParser.cpp.

nsIDOMDocument nsIDOMLSParser::parse ( in nsIDOMLSInput  input) raises (DOMException, LSException) [inherited]
nsIDOMDocument nsIDOMLSParser::parseURI ( in DOMString  uri) raises (DOMException, LSException) [inherited]
nsIDOMNode nsIDOMLSParser::parseWithContext ( in nsIDOMLSInput  input,
in nsIDOMNode  contextArg,
in unsigned short  action 
) raises (DOMException, LSException) [inherited]
void nsIDOMEventTarget::removeEventListener ( in DOMString  type,
in nsIDOMEventListener  listener,
in boolean  useCapture 
) [inherited]

This method allows the removal of event listeners from the event target.

If an EventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. EventListeners can never be invoked after being removed. Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.

Parameters:
typeSpecifies the event type of the EventListener being removed.
listenerThe EventListener parameter indicates the EventListener to be removed.
useCaptureSpecifies whether the EventListener being removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.

Definition at line 79 of file nsLSParser.h.

  {
    return mXMLHttpRequest;
  }

Member Data Documentation

const unsigned short nsIDOMLSParser::ACTION_APPEND_AS_CHILDREN = 1 [inherited]

Definition at line 61 of file nsIDOMLSParser.idl.

const unsigned short nsIDOMLSParser::ACTION_INSERT_AFTER = 4 [inherited]

Definition at line 64 of file nsIDOMLSParser.idl.

const unsigned short nsIDOMLSParser::ACTION_INSERT_BEFORE = 3 [inherited]

Definition at line 63 of file nsIDOMLSParser.idl.

const unsigned short nsIDOMLSParser::ACTION_REPLACE = 5 [inherited]

Definition at line 65 of file nsIDOMLSParser.idl.

const unsigned short nsIDOMLSParser::ACTION_REPLACE_CHILDREN = 2 [inherited]

Definition at line 62 of file nsIDOMLSParser.idl.

readonly attribute boolean nsIDOMLSParser::async [inherited]

Definition at line 51 of file nsIDOMLSParser.idl.

readonly attribute boolean nsIDOMLSParser::busy [inherited]

Definition at line 52 of file nsIDOMLSParser.idl.

Definition at line 49 of file nsIDOMLSParser.idl.

Definition at line 50 of file nsIDOMLSParser.idl.

Definition at line 86 of file nsLSParser.h.

Definition at line 91 of file nsLSParser.h.

Definition at line 88 of file nsLSParser.h.

Definition at line 89 of file nsLSParser.h.

Definition at line 85 of file nsLSParser.h.


The documentation for this class was generated from the following files: