Function Pointers
To create a native function pointer from a JavaScript function you must use the interop.FunctionReference()
constructor which accepts a single parameter - a JavaScript function. You must keep the returned object alive as long as the native side would need it.
Example:
When a function pointer is marshalled to JavaScript it is exposed as a JavaScript function.