cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: [iOS] Objective-C object binding to UIWebWiew's JavaScriptCore
Date Tue, 22 Apr 2014 16:13:53 GMT
Like it! Also - in the linked blog post they show how to capture
console.log. Would be another good DEBUG-only option.


On Tue, Apr 22, 2014 at 11:48 AM, Shazron <shazron@gmail.com> wrote:

> Yup, thats what I was thinking as well :)
>
> Another thing to add through this new method is to catch all JS exceptions
> and NSLog them natively, but there is already window.onerror, but not
> everyone uses it (or knows about it)...could be a DEBUG only option
>
>
> On Tue, Apr 22, 2014 at 8:43 AM, Andrew Grieve <agrieve@chromium.org>
> wrote:
>
> > Thanks for pointing this out! Very cool! Would allow for a much more
> > performance bridge on iOS.
> >
> > Maybe we could add it is as an optional bridge mode and let users that
> want
> > a faster bridge test the AppStore waters?
> >
> >
> > On Fri, Apr 18, 2014 at 9:38 PM, Brian LeRoux <b@brian.io> wrote:
> >
> > > This is awesome.
> > > On Apr 18, 2014 12:02 PM, "Shazron" <shazron@gmail.com> wrote:
> > >
> > >> Note: iOS 7 only.
> > >>
> > >> Two ways to grab the JSContext:
> > >> 1. Through KVC of the UIWebView object and key
> > >> "documentView.webView.mainFrame.javaScriptContext" [1]
> > >> 2. Create a NSObject category for selector
> > >> "webView:didCreateJavaScriptContext:forFrame:" [2]
> > >>
> > >> Usual caveats apply to whether any of these methods is acceptable for
> > the
> > >> App Store.
> > >>
> > >> [1]
> > >>
> > >>
> >
> http://blog.impathic.com/post/64171814244/true-javascript-uiwebview-integration-in-ios7
> > >> [2] https://github.com/TomSwift/UIWebView-TS_JavaScriptContext
> > >>
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message