| 1 |
export class Load extends $e.modules.CommandBase { |
| 2 |
apply( args ) { |
| 3 |
const component = this.component; |
| 4 |
|
| 5 |
if ( ! component.iframe ) { |
| 6 |
component.iframe = document.createElement( 'iframe' ); |
| 7 |
component.iframe.className = 'elementor-app-iframe'; |
| 8 |
component.iframe.style.cssText = '' + |
| 9 |
'display: none;' + |
| 10 |
'width: 100%;' + |
| 11 |
'height: 100%;' + |
| 12 |
'position: fixed;' + |
| 13 |
'top: 0;' + |
| 14 |
'left: 0;' + |
| 15 |
'z-index: 99999; /* Over WP Admin Bar */' + |
| 16 |
'background-color: rgba(0, 0, 0, 0.8);'; |
| 17 |
|
| 18 |
document.body.appendChild( component.iframe ); |
| 19 |
} |
| 20 |
|
| 21 |
if ( args.url === component.iframe.src ) { |
| 22 |
return; |
| 23 |
} |
| 24 |
|
| 25 |
component.iframe.src = args.url; |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
export default Load; |
| 30 |
|