Is there a way to trigger a tree node open/close event through Javascript program?

Hi,

I have a tree with onBeforeOpen, onAfterClose events which are triggered by the usual means when I click to open or close a tree node;

Snippet : Code Snippet

Is it possible to trigger those events programmatically from another JS file?
Let’s say in another JS file when I particular function or action is complete, I want call those events through the $$(‘mytree’) object.

Or else let me know if there is any other way to achieve this without the manual clicking action.

https://docs.webix.com/api__link__ui.tree_callevent.html

Just wanted to know what could be sent as array params to this below callEvent :
boolean callEvent(string name,array params);

I am passing the id of the node which is to be expanded, for example as per above snippet, I am sending the id of ‘Toyota’. Is that ok and valid param?

Thanks.

yes, for those events “id” is required argument.