-
Notifications
You must be signed in to change notification settings - Fork 3k
Feature/unsafe for alert speedup #133
New issue
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
Feature/unsafe for alert speedup #133
Conversation
…C(). This improves the speed of messages across the bridge.
|
Hey @jordanpwood! I'm reviewing your PR and it looks good. Good call on making it "opt-in". I wasn't able to test out what you said about "app hangs if you use pop-up windows from the Javascript". I'm putting |
|
@lokimeyburg, I can't seem to replicate the issue in the example app. However, in our app which uses WVJSB, when I put an alert in the javascript called by the bridge call handler (set up with |
|
Hi everyone! Wanted to give a quick update and add some notes:
Cheers! |
23327d5 to
42bd969
Compare
This change allows WebViewJavascriptBridge to send messages across the bridge without using
setTimeout. This can lead to a significant performance improvement for the time it takes to send a message to and get a response from the Javascript code. I have observed at least a 10x improvement in many of my calls. However, it also makes the app hang if you use pop-up windows from the Javascript code. Therefore, this feature is only turned on if[self.bridge disableJavscriptAlertBoxSafetyTimeout:YES]is called or thedisableAlertSafetyflag onbridge.initis set to true.