call method

JSAny? call(
  1. String cSymbol,
  2. List<JSAny?> args
)

Calls the exported C symbol cSymbol (without the leading underscore) with pre-converted JS arguments.

Implementation

JSAny? call(String cSymbol, List<JSAny?> args) {
  if (!providesSymbol(cSymbol)) {
    throw StateError(
      '$libName: WASM module has no export "_$cSymbol". The .wasm/.js '
      'artifacts are stale — rebuild them (web/build_web.sh) after '
      '`nitrogen generate`.',
    );
  }
  return module.callMethodVarArgs('_$cSymbol'.toJS, args);
}