Documentation

event

attaches an event handler to an HTML element

id event(HTMLElement node,string event,function handler, [object master] );

Parameters

nodeHTMLElementthe HTML node or its id
eventstringthe name of an HTML event (without the 'on' prefix)
handlerfunctionthe event handler
masterobjectan object that the this keyword refers to

Returns

idthe 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