You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This triggers a call to (void)webViewDidStartLoad:(UIWebView *) in EasyJSWebViewProxyDelegate that reinjects again the EasyJS callback handling, resetting the EasyJS.__callbacks variable to an empty array, forgotting any other callbacks in progress.
Solved
Solved by injecting the EasyJS javascript stuff ONLY one time, by checking a boolean variable set to true when the javascript stuff is injected.
In the same method :
if (!_injectJSDone) {
NSString* js = INJECT_JS;
//inject the basic functions first
[webView stringByEvaluatingJavaScriptFromString:js];
//inject the function interface
[webView stringByEvaluatingJavaScriptFromString:injection];
_injectJSDone = YES;
}
The text was updated successfully, but these errors were encountered:
It seems that sometimes, callbacks are ignored. It appears notably when we call multiple times the same interface method in a small gap of time.
This is caused by iframe loading in
easyjs-inject.js
:This triggers a call to
(void)webViewDidStartLoad:(UIWebView *)
inEasyJSWebViewProxyDelegate
that reinjects again the EasyJS callback handling, resetting the EasyJS.__callbacks variable to an empty array, forgotting any other callbacks in progress.Solved
Solved by injecting the EasyJS javascript stuff ONLY one time, by checking a boolean variable set to true when the javascript stuff is injected.
In the same method :
The text was updated successfully, but these errors were encountered: