function pointers

I have been using the javascript to call a function via the attributes like so: This is dooable on cpp too using function pointers, which of course would be more efficient as you wouldn’t need to copy the function over to be called within the other function. Here is the code