Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
prerenderFrame.classList.add(CLASS.VISIBLE);
frame.classList.add(CLASS.INVISIBLE);
event.on(zoid.EVENT.RENDERED, () => {
prerenderFrame.classList.remove(CLASS.VISIBLE);
prerenderFrame.classList.add(CLASS.INVISIBLE);
frame.classList.remove(CLASS.INVISIBLE);
frame.classList.add(CLASS.VISIBLE);
setTimeout(() => {
destroyElement(prerenderFrame);
}, 1000);
});
event.on(zoid.EVENT.RESIZE, ({ width: newWidth, height: newHeight }) => {
if (typeof newWidth === 'number') {
div.style.width = toCSS(newWidth);
}
if (typeof newHeight === 'number') {
div.style.height = toCSS(newHeight);
}
});
return div;
}})
}
frame.setAttribute('allowusermedia', true)
frame.setAttribute('allow', 'microphone *; camera *; geolocation *; autoplay; fullscreen;')
div.appendChild(frame);
prerenderFrame.setAttribute('class', 'hadron-iframe quark_chat_' + this.sizeClass);
prerenderFrame.setAttribute('frameborder', 0)
prerenderFrame.setAttribute('scrolling', 'no')
div.appendChild(prerenderFrame);
div.appendChild(style);
prerenderFrame.classList.add(CLASS.VISIBLE);
frame.classList.add(CLASS.INVISIBLE);
event.on(zoid.EVENT.RENDERED, () => {
prerenderFrame.classList.remove(CLASS.VISIBLE);
prerenderFrame.classList.add(CLASS.INVISIBLE);
frame.classList.remove(CLASS.INVISIBLE);
frame.classList.add(CLASS.VISIBLE);
setTimeout(() => {
destroyElement(prerenderFrame);
}, 1000);
});
event.on(zoid.EVENT.RESIZE, ({ width: newWidth, height: newHeight }) => {
if (typeof newWidth === 'number') {
div.style.width = toCSS(newWidth);
}