Giter Site home page Giter Site logo

Comments (8)

dpa99c avatar dpa99c commented on May 12, 2024 1

The PR changes look good to me:
as @jonathanli2 points out, the synchronous return value is never used in CDVWKInAppbrowser since the result is returned asynchronously via the postMessage API.
The loop was just a hangover from the UIWebView implementation that I forgot to take out.

from cordova-plugin-inappbrowser.

jonathanli2 avatar jonathanli2 commented on May 12, 2024

Add the comment from
https://stackoverflow.com/questions/26778955/wkwebview-evaluate-javascript-return-value

"This solution IS NOT WORKING anymore. The callback now called from the main Thread and if you lock the main thread in the while loop (like in this solution), the callback handler will be never called. evaluateJavaScript waits for main thread released, but it never happens because it locked in the loop. – Mike Keskinov Sep 4 at 0:21"

from cordova-plugin-inappbrowser.

jonathanli2 avatar jonathanli2 commented on May 12, 2024

As the return value from CDVWKInAppbrowser's evaluateJavascript method is actually never used, it may well just changes the function signature to
- (void)evaluateJavaScript:(NSString *)script
and so we can remove the while loop which blocks the method from returning.

Thanks
Jonathan

from cordova-plugin-inappbrowser.

jonathanli2 avatar jonathanli2 commented on May 12, 2024

A change has been made at the pull request
#341

from cordova-plugin-inappbrowser.

janpio avatar janpio commented on May 12, 2024

Could you take a look please @dpa99c?

from cordova-plugin-inappbrowser.

jonathanli2 avatar jonathanli2 commented on May 12, 2024

Any update for this pull request?

from cordova-plugin-inappbrowser.

jonathanli2 avatar jonathanli2 commented on May 12, 2024

The pull request has been merged, and the issue is closed.

Thanks
Jonathan

from cordova-plugin-inappbrowser.

janpio avatar janpio commented on May 12, 2024

(FYI: If you use closes #340 in the text of a PR, it will automatically close the issue when the PR is merged. Can use that for your next PR.)

from cordova-plugin-inappbrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.