DOM Events"

From Documentation
m
Line 3: Line 3:
 
__TOC__
 
__TOC__
  
A DOM event (<javadoc directory="jsdoc">jq.Event</javadoc>) is the DOM-level event that is usually triggered by the browser. It is usually listened by the implementation of a widget, rather than the client application.  
+
A DOM event (<javadoc directory="jsdoc">jq.Event</javadoc>) is the DOM-level event that is usually triggered by the browser. It is usually listened by the implementation of a widget, rather than the client application.
 +
 
 +
Since ZK Client Engine intercepts most DOM events and encapsulate them into the widget events, it is suggested to listen the widget events, if possible, for better performance (by overriding the corresponding methods, such as <javadoc method="doClick_(zk.Event)" directory="jsdoc">zk.Widget</javadoc>).
  
 
= How to Listen and Unlisten =
 
= How to Listen and Unlisten =
  
Technically, you could use jQuery (<javadoc directory="jsdoc">_global_.jq</javadoc>) to listen all DOM events.
+
There are two different approaches to listen a DOM event: <javadoc method="domListen_(_global_.DOMElement, _global_.String, zk.Object)">zk.Widget</javadoc> and jQuery (<javadoc directory="jsdoc">_global_.jq</javadoc>).
  
 
==Use domListen_ and domUnlisten_ ==
 
==Use domListen_ and domUnlisten_ ==
 +
 
==Use jQuery==
 
==Use jQuery==
  

Revision as of 07:47, 20 December 2010


A DOM event (Event) is the DOM-level event that is usually triggered by the browser. It is usually listened by the implementation of a widget, rather than the client application.

Since ZK Client Engine intercepts most DOM events and encapsulate them into the widget events, it is suggested to listen the widget events, if possible, for better performance (by overriding the corresponding methods, such as Widget.doClick_(Event)).

How to Listen and Unlisten

There are two different approaches to listen a DOM event: Widget.domListen_(DOMElement, String, Object) and jQuery (jq).

Use domListen_ and domUnlisten_

Use jQuery

When to Listen and Unlisten

Version History

Last Update : 2010/12/20


Version Date Content
     



Last Update : 2010/12/20

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.