event
attaches an event handler to an HTML element
id event(HTMLElement node,string event,function handler, [object master] );
Parameters
node | HTMLElement | the HTML node or its id |
event | string | the name of an HTML event (without the 'on' prefix) |
handler | function | the event handler |
master | object | an object that the this keyword refers to |
Returns
id | the event handler id (can be used by the **eventRemove()** method) |
See also
Example
// adds a handler for the 'onclick' event
webix.event("divId", "click", function(e){
//e - a native event object
do_something();
});
Back to top