JS API: support jscallback in native code