Java Script method with returned result

Hi I using call java script methods from vaadin , but methods that return result i cant back to Server side (Vaadin) please help me , how can I implement it?

Hi,

you’ll need to register a JavaScript function with JavaScript.getCurrent().addFunction() handle the value asynchronously. See
https://vaadin.com/docs/-/part/framework/advanced/advanced-javascript.html
for more info.

HTH,
Olli