Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C12F119E2 for ; Tue, 22 Apr 2014 15:49:28 +0000 (UTC) Received: (qmail 5173 invoked by uid 500); 22 Apr 2014 15:49:27 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 5144 invoked by uid 500); 22 Apr 2014 15:49:26 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 5134 invoked by uid 99); 22 Apr 2014 15:49:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2014 15:49:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shazron@gmail.com designates 209.85.216.178 as permitted sender) Received: from [209.85.216.178] (HELO mail-qc0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2014 15:49:21 +0000 Received: by mail-qc0-f178.google.com with SMTP id i8so5556504qcq.37 for ; Tue, 22 Apr 2014 08:49:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=SoQ667IO64oKXnGzMIO4ZAkh7dHcNtNj1+DPZUVyVxU=; b=AJpwJeb5rOWE6J7JnrzN17zaaH2zDY7tKRPepT2+WgtI9yQ7MQ/8w5rjPZ+tGAkgJA nk3AAP1whkkJyPe27JYzZypkUTM2+P+HA8z77kHUZ8m7CJntXkTyWejN63ONF90QCOkH 3K62qIi5UWsRalGcO0FHFL2ew/ZmR29S73uLtbBw/ccOMsnbeuCQ9Xfz9TK+UoQpV6W8 J33yQEYuCW1V+glpRGYJ/nOnbIxlJuBmIWxUxc7GjDoyh9OiSQk/AhJthWMfQEeYHkCD IB5AoWSAc+G0ahsTAyVz82UL+k0zQGTya6WsFuHAYnyUdqEUo0Z/6F6FsISL9/6CCO5c XtSw== X-Received: by 10.224.103.66 with SMTP id j2mr41728195qao.15.1398181740443; Tue, 22 Apr 2014 08:49:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.29.8 with HTTP; Tue, 22 Apr 2014 08:48:20 -0700 (PDT) In-Reply-To: References: From: Shazron Date: Tue, 22 Apr 2014 08:48:20 -0700 Message-ID: Subject: Re: [iOS] Objective-C object binding to UIWebWiew's JavaScriptCore To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7b67001ff8ced304f7a38dc1 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b67001ff8ced304f7a38dc1 Content-Type: text/plain; charset=UTF-8 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 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 wrote: > > > This is awesome. > > On Apr 18, 2014 12:02 PM, "Shazron" 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 > >> > > > --047d7b67001ff8ced304f7a38dc1--