Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setIframeUrl() {
- var iframeDoc = this.iframeEl.contentWindow.document;
- iframeDoc.open().write(
- '<body onload="window.location.href='' + this.src + ''; parent.postMessage(
- '' + this.iframeLoadedMessage + '', '*')">
- </body>
- <script>n window.document.onreadystatechange = function () {
- if(window.document.readyState === 'complete') {
- parent.postMessage('' + this.iframeOnReadyStateChangeMessage + '', '*')
- }};
- </script>'
- );
- iframeDoc.close();
- },
- <html>
- <body class="foo">
- Hello World
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement