Context menu for button in list

How to attach context menu to a button generated by list template?
(check comment on line 10)

https://snippet.webix.com/u5oe48e7

Is there a more “webix way” to create the button and context menu?

you need to use onClick handler and and pass target node along with id
https://docs.webix.com/api__link__ui.list_onclick_config.html
https://snippet.webix.com/whao29tq

Perfect, thanks a lot @intregal!

Follow up question: is there a way to add button as webix ui.button (or other component) to list’s template instead of HTML markup?

there is DEPRECATED activeContent mixin
https://docs.webix.com/api__activecontent_activecontent_config.html