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 1E9ABED3F for ; Wed, 30 Jan 2013 18:23:47 +0000 (UTC) Received: (qmail 43224 invoked by uid 500); 30 Jan 2013 18:23:47 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 43135 invoked by uid 500); 30 Jan 2013 18:23:46 -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 43127 invoked by uid 99); 30 Jan 2013 18:23:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 18:23:46 +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.53 as permitted sender) Received: from [209.85.216.53] (HELO mail-qa0-f53.google.com) (209.85.216.53) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 18:23:42 +0000 Received: by mail-qa0-f53.google.com with SMTP id z4so1111137qan.5 for ; Wed, 30 Jan 2013 10:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=PnoT3T+w90j7GM4OXA+h5iJvmdooQoVh+RIKaFBKLr8=; b=vk25xe9/xBR3DT7uUuANI5XCCAnX6FUaM51qFo9yI7/ukp8/iphIt9d4ETdx6C+INV 6B+H8/FoNESFIQ8H4LOm6gud5HHblEJGWEUq1WtiL0xT9yQ3vESy1o1Yo8tJ3hi6VUN3 Nbu6/fNnqXNRwOujOheY7/KUzLYfh4lYjUnmxpsgRkclNoSqQmMUEtQUWZOKnrnCI2TT glNbCmqASvnPVWWE95mtUPfuEaru7idGX93uSyh5/KLMJfiLDbMkGwNDGNG8fZkwkC1O 6HB2XX7tSXNX1BsE+brIF3K1+/WkKkLFzFulSP8oU7Mq12O+A4rNa+t6tZa8gkcvvkIX 8lrA== X-Received: by 10.224.221.145 with SMTP id ic17mr6007333qab.34.1359570201721; Wed, 30 Jan 2013 10:23:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.15.196 with HTTP; Wed, 30 Jan 2013 10:22:40 -0800 (PST) In-Reply-To: References: From: Shazron Date: Wed, 30 Jan 2013 10:22:40 -0800 Message-ID: Subject: Re: Global Javascript in InAppBrowser To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=20cf3074b458ebbc1904d4859aca X-Virus-Checked: Checked by ClamAV on apache.org --20cf3074b458ebbc1904d4859aca Content-Type: text/plain; charset=ISO-8859-1 Another request (on my blog post comments) is for the InAppBrowser to *follow* the whitelist: http://shazronatadobe.wordpress.com/2012/12/10/whats-new-in-cordova-ios-2-3-0/#comment-4706 On Tue, Jan 29, 2013 at 2:40 PM, Andrew Grieve wrote: > Pretty much the only API we could support on window.opener is > postMessage(). > > We might want to consider exposing a separate interface from window.open() > for activating an InAppBrowser that you want to do more with (e.g. listen > to events, inject JS/CSS). > > > On Tue, Jan 29, 2013 at 5:24 PM, Brian LeRoux wrote: > > > Would it be possible to implement window.opener ?? > > > > I'm thinking no, due to the async nature of stuff, but allergic to > > introducing more non-standard API surface. It might be time to start > > documenting where Cordova MUST diverge so we can socialize this w/ the > > various standards groups we interact with. > > > > On Tue, Jan 29, 2013 at 9:15 AM, Andrew Grieve > > wrote: > > > No. > > > > > > We do plan to support asynchronous JS communication in the future > though. > > > We didn't have a bug for it, so I've now created one: > > > https://issues.apache.org/jira/browse/CB-2305 > > > > > > On Tue, Jan 29, 2013 at 7:35 AM, Dan Mullins > > wrote: > > > > > >> If I open a local file in the InAppBrowser, can it communicate via > > >> javascript to the main application? > > >> > > >> For instance, if index.html defines the global function doSomething > > >> and opens local.html: > > >> > > >> function doSomething(input) { > > >> alert('hello ' + input) > > >> } > > >> > > >> document.addEventListener("deviceready", onDeviceReady, false); > > >> > > >> function onDeviceReady() { > > >> iabRef = window.open('local.html', '_blank', 'location=yes'); > > >> } > > >> > > >> Can local.html call doSomething? > > >> function init() { > > >> doSomething('child view'); > > >> } > > >> > > >> I'm not having any success and want to make sure I'm not missing > > something. > > >> > > >> Dan > > >> > > > --20cf3074b458ebbc1904d4859aca--