How to send postmessage from iframe So code in parent window i am creating a vue js application that is hosted in my subdomain and i want load a form from my main site using iframe. Parent page can post message like this. net, now i want to read the content of iframe and pass some parameter to display a textual message. postMessage() This method safely enables cross-origin communication. postMessage( "value", "iframe I need to load an iframe using a src attribute. This is my code I wrote eventually. com on which iframe is embedded of domain iframe. postMessage, and React. I have had no luck going the other direction. Is it possible to send a postMessage "across" two (or any number of) parents, without articifially "bubbling" it up the tree? Say the instance of iFrame B wants to say "Hello" to the instance of page. Simple way read ID of iframe within this iframe is set it similar whith "name" attribute and get I call window. php, but the iframe does not listen to it, I have tried to use many target origin like this: mainpage. Try to load a test. postMessage API requires two components. Transfer of iFrame Data to Google Analytics 4 Now that what we want to track is present in our Never used that plugin, can't really say what's wrong with it, but, alternately you can use HTML 5 postMessage. One particular aspect of JavaScript that developers need t This time the iFrame does not point anymore directly to the content on SERVER 1 but to an intermediate fictive directory "content-iframe/" located on the same server (SERVER 2). a. As Cypress does not support iframes I decided to try and run app "standalone". There is a lot of additional information I need to attach to the query. It also previews the Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers window. Here is an example demonstrates how to send a simple message between a page and a child iframe: # How to use iframe, window. However, on the initial page load, the parent window asynchronously retrieves model from an external API, which could resolve before or after the parent window receives a "mounted" message. The html at the app url will have to includes a small snippet of JS listening for the auth token from the parent window. ) main window and an iframe can exchange data using postMessages. For example This script listens for postMessage events sent by the iframe and adjusts the iframe’s height accordingly. I tried to use postMessage and addEventListener in parents iframe and child iframe. com), we can make the If B has the token, you can send it to the iframe either via query param (set the iframe URL to includes also the token) or with postMessage. postMessage() for efficient communication, using a parent window and an embedded iframe as an example. Within React app listen for In this example, the parent window sends a message to the iframe using postMessage, specifying the target origin. They got data. postMessage( some_data, page_on_A) The <iframe> is most definitely in the context of domain B, and I've confirmed that the embedded javascript in that <iframe> executes properly and calls postMessage with the A You can always send postMessage back to the iframe and let iframe handle the message. addEventListener Looked at this Q & A, but it doesn't solve for my issue: PostMessage with multiple functions or custom callbacks I need to use postMessage on load and then another within a click event, and the receiver for both would be on the For say i have a Site called example. Place in that directory a . But I can't pass a message from one iframe to another. yes i tried this but i The answer about setting the URL of the IFRAME will work if you want to send/receive from the other IFRAME. The only problem I'm having is identifying which iframe has which height. postMessage() in Section 2. From the MDN docs: The load event fires at the end of the document loading process. I have control over both sides but the content comes from two different domains. I just can't send anything back. This leaves the postMessage sent from the child frame not handled. document Find window to which you want send data via postMessage. EDIT----- I have the following. postMessage API. The implementation should be fairly simple. Here's how I used postMessage to get the height and width of a document in an iFrame. window. postMessage('Hello from JS'); In your flutter code. David Walsh has also written a good tutorial on how to do this. PostMessage used incorrectly could I wasn't able to get this working using a querySelector approach. Next: how we send the message is Window. . postMessage(. postMessage The window. postMessage didn't work but top. I'm currently working on an application where I am loading an iframe. postMessage to send the auth token to the iframe containing the app. I'm sure it's just a problem with my syntax but I am trying to send a variable to an iframe (for colorbox to use). postMessage() . , between a page and a pop-up that it spawned, or I have a greasemonkey script that opens an iframe containing a form from a different sub-domain as the parent page. If neither of those works, you could use postMessage to tell the iframes what ID to send back, or include the ID in the query string of the iframe's URL so the iframe can get it from location. getElementById('iframe'); iframe. stringify(yourObject) to send it via postMessage – Justin Redhart Etighe Commented Jul 30, 2018 at 23:52 I need to do the same but the domain of the inner frame is different that the parent document. string getemail = textbox_email. The code you have given in your sample is intended to be used in a child iframe and it is sending a message to the parent iframe. And if you have access to parent page code then any parent method can be called as well as any data can be passed directly from Iframe. getElementById('cross_domain_page'). origin will be Generate iframe and communicate via post message issues 2 postMessage from an iframe opened in in new window 0 Parent window to iframe messaging not working 11 Issue communication with postMessage from parent to 0 2 I'm integrating a Streamlit app within a Next. html I am trying to send data from my cookies captured on my website into an iframe. I want to communicate with iframe using React Hooks. Is there a way for the native app to listen for PostMessage events that I send up to them? I'm aware that addJavascriptInterface exists, I'm just hoping that there's a way to reuse my existing PostMessage code without writing something new. According to a friend to make this work we have to send html from the server (not json), with a function that will evaluate on the client and do the real postMessage. confirm = => { const { homeId, correctData } = this. contentWindow. This is an old question, but I hope this answer is helpful to someone. The site which I'm loading through the iFrame has a cookie How can i send a iframe in email body. registerViewFactory( 'hello-world-html', (int viewId) => html I'm creating Cypress e2e tests, however our app is opened as a modal (iframe) on top of a parent page. If I understand this page correctly, you instead use otherwindow. There are 3 methods: login, sign and get information. Let’s break down how to implement window. I would like to refresh the parent page when the iframe refreshes after the form submission I am at the point where I can execute a function when the iframe refreshes, but I cannot get that function to affect the parent document. postMessage to send the DOM object you just read in the iframed window to the window that is hosting the iframe window. These don't help me do that. Now, we have to allow the parent to receive that message. Introduction When it comes to web development, JavaScript is an essential programming language that allows for dynamic and interactive websites. How can I postMessage to an iframe from then. var win = document. No initial message from the main window needed! Share Follow edited Sep 8, 2017 at 9:17 display name 4,185 2 2 gold badges 31 I am working on a project where our web app needs to integrate with a 3rd party app via the postMessage protocol. Sending Messages with postMessage() The postMessage() method accepts two parameters. to it. Set the allowed origin to be the 1st received origin Edit: More Info: On my server I have a whitelist domains (for example domain. I use postMessage to send events from an iframe to it's parent document. I have a flutter web application. postMessage(dataToSend, '*'); in the browser console will show that a message has been sent, though I don't think event. Using window. There are many web resources (MDN, Matt West's Blog) teaching how to send a postMessage for a window, but the path is always sending a message from the parent to the iframe/popup. Earlier I was having a hard time sending a postMessage from the iframe to the parent node. Net. You can send messages directly from the top iframe to the bottom, or you can use index I have a page with an iframe on it, and I need a button inside the frame to do a redirection to another page, if I do it the normal way the content of the iframe will be reloaded, what I need is the main window to change its url. postMessage(). php and iframe. Then, inject a script with all_frames": true, where the existence of this flag AngularJS postmessage to iframe 2 Working with HTTP POST request with AngularJS 4 How to make HTTP POST call in Angular2 and print the response For example document. However, I need an interface through which the main page can communicate with the widget. never just blindly act The window. While your code is correct in that it returns the foreign window element, I'm not able to use postMessage on it. To quote part of your question, I need to get the postMessage that is in a <script> tag in the iframe document If you mean that you need to put or inject a <script> tag which contains postMessaging, then I'm afraid it's not possible because the same-origin policy will prevent it. I'm using iFrame. on('load', function() { this. postMessage() provides a controlled mechanism to securely circumvent this re Find window to which you want send data via postMessage. postMessage(data,receivingOrigin) . html and listen for events on it. In the course of experimenting with click tracking and heatmaps I needed to discern the size of the content on a page loaded within an iFrame in order to resize a canvas that I I have a website which communicates with a third party iframe. I tried many times, but still wasn't able to send it. Demo of a React app with an IFrame, using window. On the src page, I The API works in tandem with the Post Message API to send and receive messages. I have been able to pass messages from the parent window to the iframe using the window. , my attempts to access window. postMessage() call sends a message to the IFrame, while the window. – Mosh Feu Commented Mar 15, 2020 at 11:58 Thanks @MoshFeu. postMessage allows you to send messages not only across frames (regular frame or iframe) but also across domains. Set the target attribute In 2018 and modern browsers you can send a custom event from iframe to parent window. com (so that their common second-level domain is site. When running in a New Window, postMessage needs to be sent to opener instead of parent. I iframe window needs to listen for the "message" event, process the message, and then send a postMessage back to the window of the messenger. I have to postMessage() to Parent window only if iframe completely loads the data. I am searc postMessage - To: Information and samples for HTML5 and related APIs Using postMessage to post messages between windows & iframes. Mail. What worked for me was the following. postMessage() is triggered before iframe loading is completely done. This is how i am simply sending a mail. And when iframe is loaded . click(function() { $('#contentFrame'). I have reviewed dozens of other similar questions, but am still stuck. postMessage second attribute specifies domain to which my message can be sent. g. The iframe. Currently, I just put all this information in a parameter like so: <ifram The parent window and iframe window are from different domains so I am running into difficulty with same origin restrictions (i. parent property to get a reference to the parent window, and then use the parent's frames property to get references to all child iframes (the frames property gives you an array of such references). postMessage did work. I think @CBroe is correct in that the timing is correct. I'm working on an application in Angular 6 with a Springboot API backend. What you can do within a child iframe is use the window. com and site. Executing iframe. html, how would I do this using I have an iframe which is pointing to a moodle site. postMessage, specifically to transmit "total tokens used" information. postMessage('some message', '*'); In the iframe: I am loading an iFrame of a different domain. postMessage("Value", "*"); window. then load the test If somebody will look for solution for the same problem I can share what I have found. js application by embedding the Streamlit in an iframe. postMessage() -- particularly the suggestions in this MDN doc. You can read about the API here: window. Share I've read up on how to avoid security issues when using window. PostMessage used incorrectly could If you’re seeking an answer to the question, “How can I send data from an iframe to its parent window in a web application?” you’ve come to the right place! The window. My objective is to send data from the Streamlit app to the Next. This can be done in a The final solution would include confirmation that iframe is loaded before we use postMessage(). This tag retrieves the information from postMessage and sends it to the Data Layer. postMessage() calls in angular? I found the ng-post-message module on github and ngmodules, but I look at that code and it doesn't make a whole lot of sense to me and the documentation is lacking a working example. I'm trying to send a simple message from a child document (an iframe) back to its direct parent using the window. parent sends a When you say they're under the same domain, do you just mean with each other, or with the parent page as well? If they're on the same domain as the parent page, you can bypass postMessage entirely and just call functions directly in the page Hi Arjan and welcome to SO. site. com, peter. href property of a cross-domain iframe/window, this will throw an exception since it violates the same-origin policy. htaccess file containing: I hope you have tried postMessage, this is a javascript API , but there is browser limitation. If you want to send multiple data, you can encode in JSON: js // Called from . postMessage() to get around cross-domain security issues when communicating between a parent and an iframe. If you want to skip the theory (it’s much of the same content as you find in the video), you can jump straight to the Google Tag Manager / Google Analytics 4 solution by clicking this link. postMessage() method safely enables cross-origin communication between Windo Normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host (also known as the "same-origin policy"). If the form is to be submitted to an iframe within the form page, then it can be easily acheived using the target attribute of the tag. location. – This can be child window like: iframe, new tab window. postMessage for this job. Since postMessage() is part of the window object, you could try using the window object of the frame, which is found under the contentWindow property of the iframe. com, any Thanks, it works for me in a similar case. Yes I did it. postMessage({ action I try to send message from an iframe loaded from my extension to my extension (background script or content script). Can use iframe load event and get iframe window context inside it and post to that window $('a'). We do An iframe is used to embed another document inside a html page. Like Hi with In Internet Explorer 8, events passed as a parameter may be null, that is why you need to access the event in a different manner: In window. I want press button in parents iframe and send message to child iframe ,vice versa However I am trying to send a message between two files that are in the same folder in localhost, main. In flutter web I have already render it using IFrameElement. But if windows share the same second-level domain, for instance john. So I have something like Skip to main content About I want to use Window. iframe: var data = { foo: 'bar' } var event = new CustomEvent('myCustomEvent', { detail: data }) window. I really need to post data to an Iframe in this case, I cannot use a $. Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand OverflowAI GenAI features for Teams You can use postMessage to post from child window(i. postMessage() to it. parent. e iFrame) and then listen the event at parent. postMessage in your web app sends to the main document's window, not to the iframe's. append How to send the height of the inner iframe to its parent iframe? I am building a web widget. postMessage, part of the HTML5 Draft The directive above triggers the iFrame to send a message to the parent window every 3 seconds. Using GTM's Window Loaded trigger type (easy fix, but not great) When you create a GTM trigger you will see the Window Loaded trigger type. getElementsByTagName("BODY")[0]; After that use the window. For illustrative purposes, say this is the code, which works just fine: <html&g The window. Keep a copy of the port1 from the channel object returned from the Windows on subdomains: document. addEventListener(); This post might help you to understand more. A message Channel is created using the MessageChannel() constructor. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment window. js parent using window. Code used in this page window. Includes tool for testing your app - iframe communicator. I have a form that has been called using a iframe, now when that form is submitted i want to catch a response in the main site from where the iframe was called and depending on it would enable/disa Skip to main content About . CHANNEL_NAME. simple i want to load a form from my primary domain to my subdomain through i frame. message – A string or object that will be sent to the receiving window. Can I get some confirmation that it is not I looked into HTML5 PostMessage, but am unsure how I would tell the iframe where the parent is (line 3 in iframe. state const formData = new FormData(); formData. – The URL of the window that the message is being sent to. Send postMessage from the parent domain with it's origin. The window. So you could try something like: var frame = document. It looks as following: Finding a child window: In this article, I’ll provide a quick overview of window. H. As pointed out here, there is a perfectly fine way to determine the sender in that scenario, without giving the allow-same-origin permission: // Sandboxed iframes which lack the 'allow-same-origin' // header have "null Wait for Iframe to be loaded. However on start app is getting data I'm sitting on the same. But I c To send a message from Appsmith to an embedded app within an Iframe widget, use the global function postWindowMessage in your JS Object or configure a post message action for your widget in the Properties pane. You are correct, PostMessage is used to send messages between ifames. postMessage() method and how it can be used to dispatch messages between two windows or frames. onload = function { var iframeWin = document Window. but the point is, it does not affect on the iframe. To achieve this the parent window uses window. Since you want to send data to the iframe, register an event listener on it: window. This setup ensures secure data transfer while maintaining strict control over which origins can send or receive data. Once the action is complete within the iframe, postMessage. Now I implement it using vuejs and my code is <v-card> <ifra I am trying to communicate with cross-origin resources using postMessage(), but am unable to get it to work properly. didn't work but top. postMessage('click', '*') In my Alright, we’ve learned how to send a message from the child iframe to the parent window using parent. They all work similar. Text; System. I'm working on a website with cross-domain iframes that are resized to the correct height using postMessage. Inject a content script with "all_frames": false, in which you set a flag. Within the parent document I have the following: window. postMessage postMessage - To: Information and samples for HTML5 and related APIs Using postMessage to post messages between windows & iframes. postMessage() method is used to forward data from parent window to iframe. postMessage(URL,sendingOrgin), but that's not how you send data to another window. In my case, I need to make it work for both cases so I check for opener existence: I'm developing a Google Chrome Extension that injects a script on a webpage, gather some data from the web page, call an iframe and send that data to the iframe. I need to call postMessage to be handled by the page opened in an iframe element using ui. The iframe's content listens for messages using window. – Or a parent window – the same, partent for iframe embedded window or window opener. postMessage(message Send data between parent window and child iframe - PostMessage API March 15, 2022 Alternatives to Post Message API The Channel Messaging API is a really great alternative to the Post Message API with certain benefits like according to this topic Calling a parent window function from an iframe Say that iframe can send data back to parent window. Now how to having this information check what iframe in the main document (and of course within th If you try to read the location. domain By definition, two URLs with different domains have different origins. That's not possible: A content script cannot access any of the page's window object (including frames). My simple problem is, that i can not identify the iFrame inside of it's parent This article will tell you how to use the javascript window object’s postMessage(message, targetOrigin) method to post text messages ( or javascript object’s JSON string data ) between the iframe/popup window and it’s parent window with examples. frames["foreign"] when I would need the foreign contentWindow to postMessage to. This all workers perfectly but I'm unable to match Expected with Received I have an HTML file with javascript, that opens an external payment form, process the data and send a JSON response (See image). There's some For example, the page can communicate with an IFrame via postMessage and send events to each others' windows. addEventListener , verifies the origin, and responds to the parent window. You can use proxy iframe hosted on that other domain, you send message using postMessage to that iframe, then that iframe can do POST request (on same domain) and parent on How to communicate between an iframe and the parent page From parent page -> iframe In the parent page: const iframe = document. How To Post Message Between Html Window & iFrame/Popup Window Steps. I have 2 separate Google Tag Manager accounts - one for the iframe and one for my website. How do I send the cookie d After clicking, read the href attribute of the clicked anchor and send it to the parent window using window. POST because data received is returned sequentially (buffered) If yo Stack Overflow for Teams Where developers & technologists share private knowledge with I'm having problems using postMessage between iframe to iframe with different domains because of cross-domain issue. php When the parent receives the message it can send its message to the iframe, and be sure the iframe is ready for it. In the child Document when there is a submit button w I have a Window. Since this process needs to be cross-domain, postMessage was From parent page -> iframe In the parent page: const iframe = Tagged with html, javascript, iframe. I'll refer to the two webpages as the parent that has an iframe on it and the src as the page inside the iframe. Both the parent and the iFrame sites are under my control. MailMessage message = new System. html After few tries, I got positive feedback from the client. (https:// I keep forgetting how communication between a main window and an iframe works because I don't use it so often. But given all the preventative tips are all client-side, I'm having tr Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers I know how you can send from the iFrame to the parent, I need to send a response message after the parent receives it. Is there any way to specify that it is applicable to all subdomains. The created Iframe is loaded from the extension via a content script. Then monitor the scrollTop and height attribute of the child iframe inside the msgHandler. postMessage() method enables cross-origin communication between a window object and an embedded iFrame and therefore provides a mechanism to circumvent this restriction. postMessage to send data to the parent window from the IFrame. We create a new tag for listening to iFrame data. postMessage, which allows for communication between an iframe and the hosting window. frames["local"]. js to pass messages between different domains. postMessage() setup in an iFrame to send a message to the host React App. postMessage to post messages to the iFrame. When you're running JavascriptChannel(name: 'CHANNEL_NAME', ) flutter bind to your window WebView new MessageChannel with name you wrote) how to correctly postMessage into an iframe that has sandbox attribute enabled Ask Question Asked 6 years, 7 months ago Modified 6 years, 7 months ago Viewed 6k times 3 See below sample code If I if I uncomment the The <iframe> may send the "mounted" message several times in one session, and the parent window needs to respond with model each time. It looks as following: I want to postMessage in one iframe and send it to another iframe, independent of the parent window. How I can achiever We have an iframe in a domain different from our main website. The main page is not written in flutter. postMessage inside iframe to communicate with the current webpage like localhost:8080 the current webpage contain an iframe with a custom DOM In my Iframe : window. – user583507 I want to write a message in an iframe, then reverse it by the submit button and send it to the parent window, I have the reverse function but I don't know how to use window. Of course you must count that it wont get executed before next command in iframe. postMessage (message, '*'); Where `message` is a string. Things tried: iframe. However, I read it as you want to set a value in an existing field. Most articles go in depth of how and why, rather than serve as a quick recap, so I'll try to do that here. My post showed interaction from parent to child and back to the parent, but didn't detail passing I am looking for a way to obtain an iframe contentWindow object and post a message to it after some action of the user. For the time being I am accepting any domains on both ends (just to get it to work). addEventListener("message I want to send a message to the parent window like this: window. Just send iframe ID in message with other data. The way I've my goal is to integrate a flutter widget with the help of an iframe on my main page. The frames are in different domains (my domain, and a Google Maps iFrame). reverse_service. postMessage, it's trivial to safely send messages from the child and have the parent receive them with the message event. – user732456 The problem is postMessage() send 'null'. And is In this article, we take a look at the window. The difficulty I'm having is trying to get the window object for the other iFrame from the first iFrame The page would be laid out To achieve this, you can use window. How does this work? My question is how I get access to postMessage to send a message to the iframe and do it without re-rending it? Component: // Component (Removed majority of unrelated code) import * as React from 'react'; interface Then to In today's video I'll be showing you how to send data from an iframe up to the parent window (the page which is embedding the iframe). So one part of the app would be a simple Firstly, send() is continuously invoked to establish connection with the child iframe in componentDidMount until a reply is recieved. hash method as described in this article . Setting Up the iFrame Now, let’s focus on the iframe’s content. e. There is one more way (using html5 feature). to postMessage to. Call the window In other words, the iframe needs to pass a message to it's parent when a button is clicked. After wading through oceans of "No, cross-domain policy is a jerk" stuff, I found window. postMessage to send data. postMessage, but it is used specifically within an embedded iframe to communicate with its parent window. getElementById('myHTMLIFrameElement'); frame. html). My current solution does not feel ok with angular at all (especially accessin I am looking at doing something similar at the moment (a portal application with sub apps in an iFrame) You can communicate between your server and client (in either direction) by using window. Share Improve this answer Follow Add a comment | Does anyone have a working example of how to send and receive window. postMessage() (remember to call preventDefault() on the click event to prevent navigation inside iframe) How does a browser like chrome exchange data between a window and its IFrame (window being on 1 domain name and IFrame loads content from another domain name)? My question is, how the browser can TLDR; because the parent window can directly get the iframe's Window, the browser can use an offline, event-based communication protocol to I'm creating a react app that I want my users to embed on their websites. postMessage( "stuffYouWantToSendToTheIframe", '*' ); Your parent load handler gets called after the iframe load handler. Do note that the parent and iframe have the same domain and protocol. Currently i have function with timer that sends info on page load but i want to get more info. postMessage before sharing a setup you can use to collect dataLayer interactions that happen in the iframe and process them in the parent. For configuration of the web widget, I built a generator to generate the widget code. You need to use the message API to communicate between an iframe and its parent. You need to send I'm trying to communicate with post messages between a parent window and an iFrame. The idea is to send a message from the top iframe and listen to it in the bottom iframe. I need to pass to it my username and password, so that when the iframe is loaded, I am automatically logged in on moodle. MailMe I'm trying to use the postmessage to a page opened in a webview inside a React Native App. Parent Window: function toFrame(type, data) { $("iframe[data-atdl iFrame: I know that the MessageEvent has source property which is the window object that send the message. postMessage method is similar to window. window. postMessage() method safely enables cross-origin communication between Window objects; e. So I thought of Window postMessage and iframe in JavaScript 1. targetOrigin – The URL of the window that the message is being sent to. Specify the iframe's window object: document. search. getElementById("iframe"). – Maksim Luzik JSON. There is a new feature in HTML5, window. This iframe consists of a form where we want to track some events from outside. Probably because I can only access window. it's tricky to start communication because most of the time your aren't sure what loaded first: main window or an iframe. platformViewRegistry. This app will be shown in two iframes but I want to only show one iframe at a time. If you control both, it's much easier and this example will cover such use-case. Why do you say that the child iframes can't communicate directly? Actually, they can. Without the postMessage API, you can change the URL of iframe to point to a different dashboard URL, but this causes the full page to be reloaded, causes the navigation between dashboards to be slower, and takes the dashboard in I'm looking for a way to postMessage to a sibling iFrame without any javascript in the parent page. I embed the third party iframe and send a message to it via window. parent from the iframe are blocked). If that is the case, you need to do something like: 1 I have a problem. 1. parent. I can listen to messages from the webpage normally. You are changing and passing the event to iframe variable which has no affect on the iframe internally. Fortunately, I solved it because somehow window. Here is my code: parent. Sending a post message from the parent PostMessage must happened from the iframe itself. 2. contentWindow win. # Send data from an iframe to its parent window js // Called from the iframe window. My code works with parent to child and vice versa. I use, window. postMessage({type: 'gg', data: '0'}, '*'); But the parent window isn't receiving anything in the useEffect: useEffect(() => Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers How can I dynamically post data to an iframe in Jquery. React IFrame postMessage demo Explore this online React IFrame postMessage demo sandbox and experiment with it In your iframe, you have window. got xct tzu texr orzrfc nglrp qjgrv whz ztpu ohrqwja