Is it possible to communicate between power app and power page using window.parent.postMessage?
When I try to do this I am prevented by an iframe that is automatically generated by the Power App.
<iframe class="player-app-frame" width="100%" height="100%" tabindex="0" id="fullscreen-app-host" scrolling="no" frameborder="0" name="fullscreen-app-host" src="https://pa-static-ms.azureedge.net/resource/webplayerdynamic/publishedapp/preloadindex?preloadIndexPath=https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%2Fnhbnr3d040f0b%2Fpreloadindex.web.html&&PowerAppsLanguage=pl&loader=inline&lv=kunma3iafpii9&serviceWorkerUrl=https%3A%2F%2Fstatic.powerapps.com%2Fresource%2Fwebplayerbus%2Fhashedresources%2Fi5tf43t1ht9d0%2Fjs%2FPowerAppsServiceWorker.PublishedApp.js&unregisterServiceWorkersHash=&piv=E484BD0B&featureGates={"publishedAppServiceWorker":false}#%7B%22platform%22%3A%22notwindows%22%2C%22hideNavBar%22%3A%22true%22%2C%22cdnUrl%22%3A%22https%3A%2F%2Fcontent.powerapps.com%2Fresource%2Fapp%22%2C%22paramsQuery%22%3A%22tenantId%3Da1a9c1a3-147b-43a2-adb0-1c5dc6be1127%26sourcetime%3D1712230944244%26source%3Dportal%22%2C%22iframeMode%22%3A%22player%22%2C%22appId%22%3A%22590d1b08-d4c7-45c0-aeb1-bd5c08dd70a5%22%2C%22appIdWithVersion%22%3A%22590d1b08-d4c7-45c0-aeb1-bd5c08dd70a5%22%2C%22appName%22%3A%22590d1b08-d4c7-45c0-aeb1-bd5c08dd70a5%22%2C%22staticContentProxy%22%3A%22%2F%22%2C%22hostOrigin%22%3A%22https%3A%2F%2Fapps.powerapps.com%22%2C%22launchFunctionUrlFormat%22%3A%22https%3A%2F%2Fapps.powerapps.com%2Fplay%2F%7B0%7D%22%2C%22region%22%3A%22prod%22%2C%22staticContentUrl%22%3A%22https%3A%2F%2Fstatic.powerapps.com%22%7D" allow="geolocation; microphone; camera; fullscreen; clipboard-write" style="outline: none;" referrerpolicy="strict-origin-when-cross-origin" title="aplikacja"></iframe>
Is it possible to remove this iframe so that there is only the content of this iframe?
Or is it possible to add a script:
<script>
window.addEventListener("message", async (event) => {
if (event.data.eventType === "GOOGLE_ANALYTICS") {
window.parent.postMessage(event.data, "*");
}
}, false);
</script>
over this iframe so that I can receive the event using the listener and send it to the next iframe from powerpage?
Ultimately, I want to achieve to be able to transfer events between iframes, so that I can later eventually implement Google Analytics in the power page and send the received events to google analytics.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473