Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const $webview = document.querySelector('webview');
const $loader = document.querySelector('.loader');
let isInitialLoad = true;
$webview.addEventListener('did-start-loading', () => {
// we use client side rendering in the web app, so the loader is only needed on the first page load
if(isInitialLoad) {
isInitialLoad = false;
$webview.addEventListener('dom-ready', () => {
// have to delay in order for the webview show/resize to settle
setTimeout(() => {
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.