Eval error with function declaration in json

Hello

I try to load a button with the following json (not directly declard but loaded via webix.ui(webix.DataDriver.json.toObject(xmlhttp.responseText), $$(rootPane)):wink:

{"view":"button", 
"value":"button", 
"align":"left", 
"type":"standard", 
"id":"BUTTON_f4139d7c-d15e-4147-9067-fcd14663d122", 
"label":"Click Me", 
"click":"function(id,event) { alert(\"Button Click\"+id) }"
}

Whatever i load here either

"click":"alert(\"Button Click\"+id)" or the above, I always get

VM919:1 Uncaught SyntaxError: Unexpected token (
    at eval (<anonymous>)
    at toFunctor (webix.js?v=6.3.1:360)
    at Object.<anonymous> (webix.js?v=6.3.1:2214)
    at Object.callEvent (webix.js?v=6.3.1:483)
    at callEvent (webix.js?v=6.3.1:545)
    at HTMLBodyElement.<anonymous> (webix.js?v=6.3.1:4010)

When I click the button.
Has somebody a hint how to correctly declare a such a function in json which then is correctly loaded and eval’ed by webix? I would need the id and the generated event as parameter in the function.

Thanks

check this
https://forum.webix.com/discussion/comment/18304/#Comment_18304

Sorry, does not work. But I found the solution in the meantime, but it contradicts any logic:

“click”: “(function handleMouseClick(id,event){ yourCode;})()”