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
//提供给native使用, 这个函数调用的setTimeout ,里面的function有时候不执行。导致通信失败
function _dispatchMessageFromNative(messageJSON) { setTimeout(function() { var message = JSON.parse(messageJSON); var responseCallback; //java call finished, now need to call js callback function if (message.responseId) { responseCallback = responseCallbacks[message.responseId]; if (!responseCallback) { return; } responseCallback(message.responseData); delete responseCallbacks[message.responseId]; } else { //直接发送 if (message.callbackId) { var callbackResponseId = message.callbackId; responseCallback = function(responseData) { _doSend({ responseId: callbackResponseId, responseData: responseData }); }; } var handler = vipAccountBridge._messageHandler; if (message.handlerName) { handler = messageHandlers[message.handlerName]; } try { handler(message.data, responseCallback); } catch (exception) { if (typeof console != 'undefined') { console.log("vipAccountBridge: WARNING: javascript handler threw.", message, exception); } } } }); }
The text was updated successfully, but these errors were encountered:
关于这个问题,我试着找到了原因并提供了一个解决方法,当然我的解决方法不一定是最好的,但是可以解决目前的问题,同时也欢迎讨论,寻求更佳的解决方案。
Sorry, something went wrong.
No branches or pull requests
//提供给native使用, 这个函数调用的setTimeout ,里面的function有时候不执行。导致通信失败
The text was updated successfully, but these errors were encountered: