src/js/glightbox.js
function createIframe(config) {
    let { url, width, height, allow, callback, appendTo } = config;
    let iframe = document.createElement('iframe');
    let winWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
    iframe.className = 'vimeo-video gvideo';
    iframe.src = url;

    if (height) {
        if (isMobile && winWidth < 767) {
            iframe.style.height = ''
        } else {
            iframe.style.height = `${height}px`
        }
    }
    if (width) {
        iframe.style.width = `${width}px`
    }
    if (allow) {
        iframe.setAttribute('allow', allow)
    }
    iframe.onload = function() {
        addClass(iframe, 'iframe-ready');
        if (utils.isFunction(callback)) {
            callback()
        }
    };

    if (appendTo) {
        appendTo.appendChild(iframe);
    }
    return iframe;
}
function createIframe(config) {
    let { url, width, height, allow, callback, appendTo } = config;
    let iframe = document.createElement('iframe');
    let winWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
    iframe.className = 'vimeo-video gvideo';
    iframe.src = url;

    if (height) {
        if (isMobile && winWidth < 767) {
            iframe.style.height = ''
        } else {
            iframe.style.height = `${height}px`
        }
    }
    if (width) {
        iframe.style.width = `${width}px`
    }
    if (allow) {
        iframe.setAttribute('allow', allow)
    }
    iframe.onload = function() {
        addClass(iframe, 'iframe-ready');
        if (utils.isFunction(callback)) {
            callback()
        }
    };

    if (appendTo) {
        appendTo.appendChild(iframe);
    }
    return iframe;
}
function createIframe ( config ) { let { url , width , height , allow , callback , appendTo } = config ; let iframe = document . createElement ( 'iframe' ) ; let winWidth = window . innerWidth || document . documentElement . clientWidth || document . body . clientWidth ; iframe . className = 'vimeo-video gvideo' ; iframe . src = url ; if ( height ) { if ( isMobile && winWidth < 767 ) { iframe . style . height = '' } else { iframe . style . height = ` ${ height } ` } } if ( width ) { iframe . style . width = ` ${ width } ` } if ( allow ) { iframe . setAttribute ( 'allow' , allow ) } iframe . onload = function ( ) { addClass ( iframe , 'iframe-ready' ) ; if ( utils . isFunction ( callback ) ) { callback ( ) } } ; if ( appendTo ) { appendTo . appendChild ( iframe ) ; } return iframe ; }
Create an iframe element

@param {string} url
@param {numeric} width
@param {numeric} height
@param {function} callback
Create an iframe element