braintree / popup-bridge-android

PopupBridge allows WebViews to open popup windows in a browser and send data back to the WebView
MIT License
53 stars 27 forks source link

Run evaluateJavascript on the UI thread #13

Closed quinnjn closed 6 years ago

quinnjn commented 6 years ago

Wrapping the evaluateJavascript in a View#post to make sure it is being ran on the same thread as the WebView.

evaluateJavascript (along with all the WebView public methods) call WebView#checkThread which checks that the method was called on the same thread as the WebView's thread.

This should fix #10.

@braintree/team-dx

quinnjn commented 6 years ago

I can't approve my own PR but I 👍 the commit you made @crookedneighbor