我试图通过invokeMonoMethod方法调用c#方法但是我不想将任何参数传递给此方法:
invokeMonoMethod('MonoSanityClient', 'MonoSanityClient', 'Examples', 'getMessage')
当我不通过论证时,会返回以下信息:
Uncaught TypeError: Cannot read property 'length' of undefined
at callMethod (loader.js:106)
at invokeMonoMethod (loader.js:43)
at showAlert ((index):77)
at HTMLButtonElement.onclick ((index):11)
收到此消息后,我试图以这种方式传递一个空数组:
invokeMonoMethod('MonoSanityClient', 'MonoSanityClient', 'Examples', 'getMessage', [])
我收到了这个错误:
Uncaught abort(). Build with -s ASSERTIONS=1 for more info.