Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIScriptEventHandlerOwner Class Reference

Associate a compiled event handler with its target object, which owns it This is an adjunct to nsIScriptObjectOwner that nsIEventListenerManager's implementation queries for, in order to avoid recompiling a recurrent or prototype-inherited event handler. More...

#include <nsIScriptObjectOwner.h>

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

List of all members.

Public Member Functions

virtual nsresult CompileEventHandler (nsIScriptContext *aContext, void *aTarget, nsIAtom *aName, const nsAString &aBody, const char *aURL, PRUint32 aLineNo, void **aHandler)=0
 Compile the specified event handler, and bind it to aTarget using aContext.
virtual nsresult GetCompiledEventHandler (nsIAtom *aName, void **aHandler)=0
 Retrieve an already-compiled event handler that can be bound to a target object using a script context.

Detailed Description

Associate a compiled event handler with its target object, which owns it This is an adjunct to nsIScriptObjectOwner that nsIEventListenerManager's implementation queries for, in order to avoid recompiling a recurrent or prototype-inherited event handler.

Definition at line 101 of file nsIScriptObjectOwner.h.


Member Function Documentation

virtual nsresult nsIScriptEventHandlerOwner::CompileEventHandler ( nsIScriptContext aContext,
void aTarget,
nsIAtom aName,
const nsAString &  aBody,
const char *  aURL,
PRUint32  aLineNo,
void **  aHandler 
) [pure virtual]

Compile the specified event handler, and bind it to aTarget using aContext.

Parameters:
aContextthe context to use when creating event handler
aTargetthe object to which to bind the event handler
aNamethe name of the handler
aBodythe handler script body
aURLthe URL or filename for error messages
aLineNothe starting line number of the script for error messages
aHandlerthe compiled, bound handler object

Implemented in nsXULElement.

virtual nsresult nsIScriptEventHandlerOwner::GetCompiledEventHandler ( nsIAtom aName,
void **  aHandler 
) [pure virtual]

Retrieve an already-compiled event handler that can be bound to a target object using a script context.

Parameters:
aNamethe name of the event handler to retrieve
aHandlerthe compiled event handler

Implemented in nsXULElement.


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