Why use JavaScriptCore in iOS7 if it can't access a UIWebView's runtime?

后端 未结 5 919
广开言路
广开言路 2020-12-23 17:55

This is in response to this blog:

http://blog.bignerdranch.com/3784-javascriptcore-and-ios-7/

Thoughts from the iOS devs on SO?

5条回答
  •  悲&欢浪女
    2020-12-23 18:40

    I came up with an approach to get the UIWebView JSContext that is different from the KVC approach.

    Basically, by knowing some details about WebKit, we can implement a delegate callback method on NSObject and be handed the JSContext when it is created. Details here:

    https://github.com/TomSwift/UIWebView-TS_JavaScriptContext

提交回复
热议问题