Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Types | Protected Attributes
nsJSEventListener Class Reference

#include <nsJSEventListener.h>

Inheritance diagram for nsJSEventListener:
Inheritance graph
Collaboration diagram for nsJSEventListener:
Collaboration graph

List of all members.

Public Member Functions

 nsJSEventListener (nsIScriptContext *aContext, JSObject *aScopeObject, nsISupports *aObject)
virtual ~nsJSEventListener ()
SetEventName (nsIAtom *aName)
void handleEvent (in nsIDOMEvent event)
 This method is called whenever an event occurs of the type for which the EventListener interface was registered.
nsIScriptContextGetEventContext ()
nsISupports * GetEventTarget ()
JSObjectGetEventScope ()

Protected Types

enum  nsReturnResult { nsReturnResult_eNotSet, nsReturnResult_eReverseReturnResult, nsReturnResult_eDoNotReverseReturnResult }

Protected Attributes

nsCOMPtr< nsIAtommEventName
nsReturnResult mReturnResult
nsISupports * mTarget

Detailed Description

Definition at line 50 of file nsJSEventListener.h.

Member Enumeration Documentation


Definition at line 69 of file nsJSEventListener.h.

Constructor & Destructor Documentation

nsJSEventListener::nsJSEventListener ( nsIScriptContext aContext,
JSObject aScopeObject,
nsISupports *  aObject 

Definition at line 54 of file nsJSEventListener.cpp.

  : nsIJSEventListener(aContext, aScopeObject, aObject),
  if (aScopeObject && aContext) {
    JSContext *cx = (JSContext *)aContext->GetNativeContext();

    ::JS_LockGCThing(cx, aScopeObject);

Here is the call graph for this function:

Definition at line 67 of file nsJSEventListener.cpp.

Here is the call graph for this function:

Member Function Documentation

Definition at line 71 of file nsIJSEventListener.h.

    return mContext;
JSObject* nsIJSEventListener::GetEventScope ( ) [inline, inherited]

Definition at line 81 of file nsIJSEventListener.h.

    return mScopeObject;
nsISupports* nsIJSEventListener::GetEventTarget ( ) [inline, inherited]

Definition at line 76 of file nsIJSEventListener.h.

    return mTarget;

This method is called whenever an event occurs of the type for which the EventListener interface was registered.

evtThe Event contains contextual information about the event. It also contains the stopPropagation and preventDefault methods which are used in determining the event's flow and default action.

Implements nsIJSEventListener.

Definition at line 89 of file nsJSEventListener.cpp.

Member Data Documentation

Definition at line 94 of file nsIJSEventListener.h.

Definition at line 67 of file nsJSEventListener.h.

Definition at line 75 of file nsJSEventListener.h.

JSObject* nsIJSEventListener::mScopeObject [protected, inherited]

Definition at line 95 of file nsIJSEventListener.h.

nsISupports* nsIJSEventListener::mTarget [protected, inherited]

Definition at line 96 of file nsIJSEventListener.h.

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