@@ -232,15 +232,11 @@ exports.default = {
232
232
type : String ,
233
233
required : false
234
234
} ,
235
- frameborder : {
236
- type : String ,
237
- required : false
238
- } ,
239
- gesture : {
235
+ allow : {
240
236
type : String ,
241
237
required : false
242
238
} ,
243
- allow : {
239
+ name : {
244
240
type : String ,
245
241
required : false
246
242
}
@@ -267,7 +263,7 @@ exports.default = {
267
263
} ,
268
264
setIframeUrl : function setIframeUrl ( ) {
269
265
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 ' ) ;
271
267
272
268
iframeDoc . close ( ) ;
273
269
} ,
@@ -278,14 +274,14 @@ exports.default = {
278
274
} , 200 ) ,
279
275
initIframe : function initIframe ( ) {
280
276
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 ) ;
284
277
this . iframeEl . setAttribute ( 'style' , 'visibility: hidden; position: absolute; top: -99999px; border: none;' ) ;
278
+ if ( this . src ) this . iframeEl . setAttribute ( 'iframe-src' , this . src ) ;
285
279
if ( this . className ) this . iframeEl . setAttribute ( 'class' , this . className ) ;
286
280
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 ) ;
288
283
if ( this . allow ) this . iframeEl . setAttribute ( 'allow' , this . allow ) ;
284
+ if ( this . name ) this . iframeEl . setAttribute ( 'name' , this . name ) ;
289
285
290
286
this . $el . appendChild ( this . iframeEl ) ;
291
287
0 commit comments