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 7E048E5FF for ; Tue, 29 Jan 2013 22:40:58 +0000 (UTC) Received: (qmail 78597 invoked by uid 500); 29 Jan 2013 22:40:58 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 78576 invoked by uid 500); 29 Jan 2013 22:40:58 -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 78566 invoked by uid 99); 29 Jan 2013 22:40:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 22:40:58 +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 agrieve@google.com designates 209.85.214.177 as permitted sender) Received: from [209.85.214.177] (HELO mail-ob0-f177.google.com) (209.85.214.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 22:40:53 +0000 Received: by mail-ob0-f177.google.com with SMTP id wc18so980395obb.8 for ; Tue, 29 Jan 2013 14:40:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=/5u0I88C52vclua30PztE/1s/C+aRN2uZOMcZCXvqFg=; b=L/uWKyzuyG4zVaOVNUgK4Ju7CGV67gpgJVDXHHoyvTtuof6ZLCoHdfM+xdb4tAOHIW 03Ux6QmJHCmovY68vHJd2GFrrqScjKwVOgldZk3KXOsMi8XaofxtxT4bMnsp6mxoxM2P G61mFL58PPIZP3lltOJOmi97L5mIJPNLf5ehhiBVp+aAKngyq1mHCY7Le8ziVtvAIbDh HgOF+JEWxkG2WbUSsp4i33U3Fm+imtvpqzZdNwDgtTzXeIgnUEiDYyDlf8yDaxHSz2Qu efxhedSKlu1TRDbkQhB5rjV47gYhzak5ENSCoNO+iIOhuvqcpBqVaWd/0OGn1Ri2bLlv 9dcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=/5u0I88C52vclua30PztE/1s/C+aRN2uZOMcZCXvqFg=; b=VXVFrYQ9yb6BOJhSWXZmyMFeUZKCsl2hL4Aq0f3BH98a4i15yQzj7S0Nw0PXy8y8o5 en/9T6LRf9sKhq1Q4YVNcqiRGP/3C0H+Eaw4qWAwr9WHAGkow5AS7va+tjqXiiuWgyeB 7RPIWyPr3UP88KlLgMdWH3hmNw0Symd5PuhpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=/5u0I88C52vclua30PztE/1s/C+aRN2uZOMcZCXvqFg=; b=htaJyhzyO2Cr0HkR31i2t2N44QiVFtW2bdgq+GlZ1RtW5w0+16LkiGXRWE2J2TBM8N pKhXdZf0dMen11dsmrLFKgXSsxWBRu9VvdGukL5NJvJ6BnXDnjtcEWfRWf08DgCbZq3y mGROHPvg8Who1RYmlh38egNOsGfZjXgV5ontTRTRcimQYQzfiHWLqwlcrz/wixIC2jpT xK5bLQCNokwbdL4ra6okoTt8cB7outyHtTYUdzmnFRae8DA2uRWC9jGNZMZbI190JovQ GBhZGHVQw/66oOJFjuDMjs+TJfhmhTpxj786sNStCv1ubxnyOJ70Qn2HgoceylWtXWxM TrJg== X-Received: by 10.60.13.73 with SMTP id f9mr2020776oec.131.1359499233136; Tue, 29 Jan 2013 14:40:33 -0800 (PST) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.182.89.200 with HTTP; Tue, 29 Jan 2013 14:40:12 -0800 (PST) In-Reply-To: References: From: Andrew Grieve Date: Tue, 29 Jan 2013 17:40:12 -0500 X-Google-Sender-Auth: JXyqbzqiH3SPbnQuDFK-Ml3OL-k Message-ID: Subject: Re: Global Javascript in InAppBrowser To: dev Content-Type: multipart/alternative; boundary=e89a8fb20276dd111a04d4751457 X-Gm-Message-State: ALoCoQlB+cZB6GhY0OLQKlQzuw+KTomqBUCT8ms0x7m2Ocgir1l/U4I3OF6wP1P4Px0qsJGjP8rpwMsjk/Ge25VHeW5TCJ0rPAl8+s01USlIxPeXYWTm7ixPxRsQLhrrqYO8b/3Qy226tIYUo6A/q2mnA86zNkLDufhtD4ODry7MvCfCFNQ814rypnwhLDxV13x9aPem3kBr X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb20276dd111a04d4751457 Content-Type: text/plain; charset=ISO-8859-1 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 > >> > --e89a8fb20276dd111a04d4751457--