Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4745A200BAA for ; Thu, 22 Sep 2016 04:19:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 45E69160ADB; Thu, 22 Sep 2016 02:19:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 88206160ADE for ; Thu, 22 Sep 2016 04:19:21 +0200 (CEST) Received: (qmail 51613 invoked by uid 500); 22 Sep 2016 02:19:20 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 51511 invoked by uid 99); 22 Sep 2016 02:19:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2016 02:19:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 713C62C2A62 for ; Thu, 22 Sep 2016 02:19:20 +0000 (UTC) Date: Thu, 22 Sep 2016 02:19:20 +0000 (UTC) From: "Pier Bover (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CB-11885) iframe message error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 22 Sep 2016 02:19:22 -0000 Pier Bover created CB-11885: ------------------------------- Summary: iframe message error Key: CB-11885 URL: https://issues.apache.org/jira/browse/CB-11885 Project: Apache Cordova Issue Type: Bug Components: Plugin WKWebViewEngine Affects Versions: 4.2.1 Environment: iOS 9 Reporter: Pier Bover Assignee: Shazron Abdullah When trying to communicate between an iframe and the main window using Window.postMessage() I get the error: `Blocked a frame with origin "null" from accessing a frame with origin "null".` This only happens from the iframe to the main window, when communicating the other way around it works fine. Both files are run locally. The error only happens after adding the plugin `cordova-plugin-wkwebview-engine`. When using UIWebView the error does not happen. The weird thing is that this error is shown exactly 11 times, but the message goes through anyway. See this screenshot taken from Safari while using the simulator: http://i.imgur.com/JJkIEy5.jpg You can the Messageevent happening at the end. I have added `sandbox="allow-same-origin allow-scripts allow-popups allow-forms"` to the iframe tag and it fix it. This is the code that listens to the message: `window.addEventListener("message", eventHandler, false);` And this is the code that emits the message from the iframe: `parent.postMessage(something,"*")` -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org