triggerEvent

creates and triggers native DOM event

void triggerEvent(HTMLElement node,string type,string name,object details);

Parameters

nodeHTMLElementHTML element for which event is created
typestringevent "family"
namestringevent name
detailsobjectcontainer for transferring user data

Example

var node = document.getElementById("mydiv");
webix.html.triggerEvent(node, "MouseEvent", "click", { some: "field" });

Details

Note that details parameter would work only if you are using modern browsers and the right type of event (f.e "MouseEvent" instead of "MouseEvents").

See also
Back to top