We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a helper that handles calling into JS behind the scenes and supports both sync and async mode.
Something along the lines of:
SWIG_NAPI_Call(js_callback, [](std::vector<napi_value> &js_args, int passcode, const std::string &name){ $typemap(out, int, 1=passcode, result=js_args.at(0), argnum=callback argument 1); $typemap(out, std::string, 1=name, result=js_args.at(1), argnum=callback argument 2); }, [](std::vector<napi_value> &js_args){ Napi::Value js_ret = js_callback.Call(env.Undefined(), js_args); }, [](){ std::string c_ret; $typemap(in, std::string, input=js_ret, 1=c_ret, argnum=JavaScript callback return value) return c_ret; });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Provide a helper that handles calling into JS behind the scenes and supports both sync and async mode.
Something along the lines of:
The text was updated successfully, but these errors were encountered: