addFunction method

int addFunction(
  1. JSFunction<Function> f,
  2. String sig
)

Adds a JS function to the module's function table and returns its index (usable as a C function pointer). Requires -sALLOW_TABLE_GROWTH and addFunction in EXPORTED_RUNTIME_METHODS.

Implementation

external int addFunction(JSFunction f, String sig);