khtml Library API Documentation

KJS::JSEventListener Class Reference

Inheritance diagram for KJS::JSEventListener:

Inheritance graph
[legend]
Collaboration diagram for KJS::JSEventListener:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JSEventListener (Object _listener, ObjectImp *_compareListenerImp, const Object &_win, bool _html=false)
virtual ~JSEventListener ()
void hackSetThisObj (Object &thisObj)
void hackUnsetThisObj ()
virtual void handleEvent (DOM::Event &evt)
virtual DOM::DOMString eventListenerType ()
virtual Object listenerObj () const
ObjectImp * listenerObjImp () const
void clear ()

Protected Attributes

Object listener
ObjectImp * compareListenerImp
bool html
Object win
Object m_hackThisObj

Detailed Description

Definition at line 33 of file kjs_events.h.


Constructor & Destructor Documentation

JSEventListener::JSEventListener Object  _listener,
ObjectImp *  _compareListenerImp,
const Object &  _win,
bool  _html = false
 

Parameters:
_listener the function object, that will be called when the event is emitted
_win Window object, for memory management and caching. Never create a JSEventListener directly, use Window::getJSEventListener.

Definition at line 42 of file kjs_events.cpp.

References compareListenerImp, and win.


Member Function Documentation

void JSEventListener::handleEvent DOM::Event evt  )  [virtual]
 

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

Parameters

Parameters:
evt The 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.

Reimplemented from DOM::EventListener.

Reimplemented in KJS::JSLazyEventListener.

Definition at line 59 of file kjs_events.cpp.

References KJS::Window::afterScriptExecution(), DOM::Event::currentTarget(), KJS::KJSDebugWin::debugWindow(), DOM::DomShared::deref(), KJS::getDOMEvent(), KJS::getDOMNode(), html, KJSProxy::interpreter(), KHTMLPart::jScript(), listener, m_hackThisObj, DOM::Event::preventDefault(), DOM::DomShared::ref(), KJS::ScriptInterpreter::setCurrentEvent(), KJS::Window::setCurrentEvent(), KJSCPUGuard::start(), KJSCPUGuard::stop(), QVariant::toBool(), QVariant::type(), KJS::ValueToVariant(), and win.

Referenced by KJS::JSLazyEventListener::handleEvent(), and KJS::Image::notifyFinished().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for khtml Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 15 11:16:00 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003