Giter Site home page Giter Site logo

Comments (3)

marcuswestin avatar marcuswestin commented on June 9, 2024

Hey - awesome, thanks man!

Was the bug that messages sent from the JS before the "WebViewJavascriptBridgeReady" event fired would not get delivered right away? I imagine that e.g. if the objc sent message A right away after creating the bridge, and the JS then sent message B back to objc immediately upon receiving A, then B would not get delivered right away (the JS would throw in _sendMessage since _readyMessageIframe would not yet be created).

Does that sound right?

The commit message mentions periodic crashes - would the objc app crash, or does that refer to the JS crashing/throwing an exception?

Thanks again!
Marcus

from webviewjavascriptbridge.

psineur avatar psineur commented on June 9, 2024

It's only about Javascript crashes - it does nothing for the app.
Due to timeout (even with zero time) - some part of
WebViewJavascriptBridge was not initialized, so sending messages from
Javascript to Objective-C was failed (Javascript exception thrown in
_sendMessage).

We used pretty hackish debugger for Javascript in UIWebView to found this.
https://gist.github.com/1468281

I never used WebViewJavascriptBridge for sending messages from
Objective-C to Javascript - cause i always can use UIWebView#
stringByEvaluatingJavaScriptFromString: directly.

Here's how we have this bug:

  1. Integrate WebViewJavascriptBridge into js DOM. in webViewDidFinishLoad:
  2. Call our own js-function via
    UIWebView#stringByEvaluatingJavaScriptFromString, that sometime calls
    WebViewJavascriptBridge.sendMessage in JS.

12.12.11 18:34, Marcus Westin пишет:

Hey - awesome, thanks man!

Was the bug that messages sent from the JS before the "WebViewJavascriptBridgeReady" event fired would not get delivered right away? I imagine that e.g. if the objc sent message A right away after creating the bridge, and the JS then sent message B back to objc immediately upon receiving A, then B would not get delivered right away (the JS would throw in _sendMessage since _readyMessageIframe would not yet be created).

Does that sound right?

The commit message mentions periodic crashes - would the objc app crash, or does that refer to the JS crashing/throwing an exception?

Thanks again!
Marcus


Reply to this email directly or view it on GitHub:
#6 (comment)

from webviewjavascriptbridge.

marcuswestin avatar marcuswestin commented on June 9, 2024

This should be fixed since 7d857f4

from webviewjavascriptbridge.

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.