attaches an event handler to an HTML element
| node | EventTarget|string | the HTML node or its id |
| event | string | the name of an HTML event (without the 'on' prefix) |
| handler | function | the event handler |
| context | object | context object with additional settings (described below) |
| id | event handler ID (can be used by the eventRemove() method) |
// adds a handler for the 'onclick' event of some HTML element
webix.event("divId", "click", function(e){
//e - a native event object
do_something();
});
// adds a handler for the 'onKeyUp' event of the List component
webix.event($$("list").getNode(), "keyup", function(e){
//e - a native event object
do_something();
}, {bind:$$("list")});
The optional context parameter may include: