Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
officert committed Dec 19, 2019
1 parent 98f47d7 commit f1242ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
18 changes: 7 additions & 11 deletions dist/vue-friendly-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,11 @@ exports.default = {
type: String,
required: false
},
frameborder: {
type: String,
required: false
},
gesture: {
allow: {
type: String,
required: false
},
allow: {
name: {
type: String,
required: false
}
Expand All @@ -267,7 +263,7 @@ exports.default = {
},
setIframeUrl: function setIframeUrl() {
var iframeDoc = this.iframeEl.contentWindow.document;
iframeDoc.open().write('\n <body onload="window.location.href=\'' + this.src + '\'; parent.postMessage(\'' + this.iframeLoadedMessage + '\', \'*\')"></body>\n <script>\n window.document.onreadystatechange = function () {\n if(window.document.readyState === \'complete\') {\n parent.postMessage(\'' + this.iframeOnReadyStateChangeMessage + '\', \'*\')\n }\n };\n </script>\n ');
iframeDoc.open().write('\n <body onload="window.location.href=\'' + this.src + '\'; parent.postMessage(\'' + this.iframeLoadedMessage + '\', \'*\')"></body>\n <script>\n window.document.onreadystatechange = function () {\n if (window.document.readyState === \'complete\') {\n parent.postMessage(\'' + this.iframeOnReadyStateChangeMessage + '\', \'*\')\n }\n };\n </script>\n ');

iframeDoc.close();
},
Expand All @@ -278,14 +274,14 @@ exports.default = {
}, 200),
initIframe: function initIframe() {
this.iframeEl = document.createElement('iframe');
this.iframeEl.setAttribute('iframe-src', this.src);
this.iframeEl.setAttribute('crossorigin', this.crossorigin);
this.iframeEl.setAttribute('target', this.target);
this.iframeEl.setAttribute('style', 'visibility: hidden; position: absolute; top: -99999px; border: none;');
if (this.src) this.iframeEl.setAttribute('iframe-src', this.src);
if (this.className) this.iframeEl.setAttribute('class', this.className);
if (this.class) this.iframeEl.setAttribute('class', this.class);
if (this.gesture) this.iframeEl.setAttribute('gesture', this.gesture);
if (this.crossorigin) this.iframeEl.setAttribute('crossorigin', this.crossorigin);
if (this.target) this.iframeEl.setAttribute('target', this.target);
if (this.allow) this.iframeEl.setAttribute('allow', this.allow);
if (this.name) this.iframeEl.setAttribute('name', this.name);

this.$el.appendChild(this.iframeEl);

Expand Down
2 changes: 1 addition & 1 deletion dist/vue-friendly-iframe.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/docs.js

Large diffs are not rendered by default.

0 comments on commit f1242ed

Please sign in to comment.