Skip to content

Commit f1242ed

Browse files
committed
build
1 parent 98f47d7 commit f1242ed

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

Diff for: dist/vue-friendly-iframe.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,11 @@ exports.default = {
232232
type: String,
233233
required: false
234234
},
235-
frameborder: {
236-
type: String,
237-
required: false
238-
},
239-
gesture: {
235+
allow: {
240236
type: String,
241237
required: false
242238
},
243-
allow: {
239+
name: {
244240
type: String,
245241
required: false
246242
}
@@ -267,7 +263,7 @@ exports.default = {
267263
},
268264
setIframeUrl: function setIframeUrl() {
269265
var iframeDoc = this.iframeEl.contentWindow.document;
270-
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 ');
266+
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 ');
271267

272268
iframeDoc.close();
273269
},
@@ -278,14 +274,14 @@ exports.default = {
278274
}, 200),
279275
initIframe: function initIframe() {
280276
this.iframeEl = document.createElement('iframe');
281-
this.iframeEl.setAttribute('iframe-src', this.src);
282-
this.iframeEl.setAttribute('crossorigin', this.crossorigin);
283-
this.iframeEl.setAttribute('target', this.target);
284277
this.iframeEl.setAttribute('style', 'visibility: hidden; position: absolute; top: -99999px; border: none;');
278+
if (this.src) this.iframeEl.setAttribute('iframe-src', this.src);
285279
if (this.className) this.iframeEl.setAttribute('class', this.className);
286280
if (this.class) this.iframeEl.setAttribute('class', this.class);
287-
if (this.gesture) this.iframeEl.setAttribute('gesture', this.gesture);
281+
if (this.crossorigin) this.iframeEl.setAttribute('crossorigin', this.crossorigin);
282+
if (this.target) this.iframeEl.setAttribute('target', this.target);
288283
if (this.allow) this.iframeEl.setAttribute('allow', this.allow);
284+
if (this.name) this.iframeEl.setAttribute('name', this.name);
289285

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

Diff for: dist/vue-friendly-iframe.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: docs/docs.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)