Some potential good news. Updated 4 days ago, hopefully its in beta 2: http://trac.webkit.org/changeset/169765
"Add -[WKWebView evaluateJavaScript:completionHandler:]" Updated: https://issues.apache.org/jira/browse/CB-6884 On Sat, Jun 7, 2014 at 10:06 PM, Carlos Santana <csantan...@gmail.com> wrote: > ok, was a bit confuse with api doc, I assumed that there was a way to > specify a time other than documentstart, documentend, and no passing > something will do it immediately. > > Will open a radar too, we need wkwebview to officialy support for objc->js, > postMessage seems kind of half working if only can do js->objc > > > On Sat, Jun 7, 2014 at 10:48 PM, Shazron <shaz...@gmail.com> wrote: > >> No it's not. That is precisely what we discussed, it's the limitation in >> WKUserScript. >> >> On Saturday, June 7, 2014, Carlos Santana <csantan...@gmail.com> wrote: >> >> > Shaz >> > I think the closest replacement is [1] - (void)addUserScript:( >> > WKUserScript *)*userScript * >> > >> > I have not tried my self, but looking forward on helping out. >> > >> > [1]: >> > >> > >> https://developer.apple.com/library/prerelease/ios/documentation/WebKit/Reference/WKUserContentController_Ref/index.html#//apple_ref/occ/instm/WKUserContentController/addUserScript >> > : >> > >> > >> > On Fri, Jun 6, 2014 at 12:47 AM, Shazron <shaz...@gmail.com> wrote: >> > >> > > No use in polling if we can't write anything back to JS from Obj-C. >> > > >> > > There's a private API to do so: >> > > >> > > >> > >> https://github.com/WebKit/webkit/commit/adb4c60064b38b5ab3d6e78422325f35f0b7fe2b >> > > only landed a few months ago, we'll have to do some advocacy through >> > > whatever channels we have to get it in the public API (radars, >> > > connections), since it is a deficiency in their API losing something >> > > like stringByEvaluatingJavaScriptFromString >> > > >> > > >> > > >> > > On Thu, Jun 5, 2014 at 6:09 PM, Michal Mocny <mmo...@chromium.org> >> > wrote: >> > > > Oh wow. I totally assumed that you can postMessage in either >> direction >> > > at >> > > > any time. Wouldn't the alternative be polling from JS? >> > > > >> > > > -Michal >> > > > >> > > > >> > > > On Thu, Jun 5, 2014 at 6:46 PM, Shazron <shaz...@gmail.com> wrote: >> > > > >> > > >> Well seems like the answer in iOS 8 beta 1 is -- no arbitrary >> sending >> > > >> of JS, so no Obj-C -> JS communication, which leaves Cordova >> > > >> handcuffed. Please everyone file radars for this. >> > > >> https://devforums.apple.com/message/975230#975230 >> > > >> >> > > >> On Thu, Jun 5, 2014 at 3:40 PM, Shazron <shaz...@gmail.com> wrote: >> > > >> > Thanks Tommy - I sure will. >> > > >> > >> > > >> > I think injecting JavaScript at arbitrary times -- you would just >> > use >> > > >> > WKUserScriptInjectionTimeAtDocumentEnd for WKUserScript -- >> although >> > I >> > > >> > haven't tested it. If setting JS at arbitrary times is taken away >> - >> > > >> > yikes. >> > > >> > >> > > >> > Anyways, on the bridge front, I've posted my approach for the new >> > > bridge: >> > > >> > https://issues.apache.org/jira/browse/CB-6884 >> > > >> > >> > > >> > On Thu, Jun 5, 2014 at 2:06 PM, Tommy Williams < >> to...@devgeeks.org> >> > > >> wrote: >> > > >> >> I am sure you won't need it, but if I can help, let me know. >> > > >> >> >> > > >> >> I think the biggest hurdle will be firing user scripts at >> arbitrary >> > > >> times >> > > >> >> instead of only on page load.. There seems to be an API that >> hasn't >> > > been >> > > >> >> exposed :/ >> > > >> >> On 6 Jun 2014 04:59, "Shazron" <shaz...@gmail.com> wrote: >> > > >> >> >> > > >> >>> My intent is to work on this today, in a branch for cordova-ios: >> > > >> >>> https://issues.apache.org/jira/browse/CB-6863 >> > > >> >>> >> > > >> >>> On Wed, Jun 4, 2014 at 10:15 AM, Shazron <shaz...@gmail.com> >> > wrote: >> > > >> >>> > Use Safari to watch "Introducing the Modern WebKit API" (no >> > login >> > > >> >>> required): >> > > >> >>> > https://developer.apple.com/videos/wwdc/2014/ >> > > >> >>> > >> > > >> >>> > On Wed, Jun 4, 2014 at 8:25 AM, Michal Mocny < >> > mmo...@chromium.org >> > > > >> > > >> >>> wrote: >> > > >> >>> >> You can probably bet on it. >> > > >> >>> >> >> > > >> >>> >> But this is really fresh news, we're as excited as you are, >> > > trying >> > > >> to >> > > >> >>> >> figure out the details. >> > > >> >>> >> >> > > >> >>> >> >> > > >> >>> >> On Wed, J-- >> > Carlos Santana >> > <csantan...@gmail.com <javascript:;>> >> > >> > > > > -- > Carlos Santana > <csantan...@gmail.com>