HTML template return value


i’m pretty sure i managed to get the return value from the javascrpit function from the template.
I was convinced that console.log would return the value to the console, but I seem to have been mistaken.
can someone help me how to get the value back from the html template

thanks in advance

it looks like this does not work only on casparcg version form nrkno (v2.1.11_NRK)