๐Ÿ“ฆ microsoft / playwright

๐Ÿ“„ electron-window-app-delayed-loadURL.js ยท 14 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14const { app, BrowserWindow } = require('electron');

app.whenReady().then(() => {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
  });
  setTimeout(() => {
    win.loadURL('data:text/html,<h1>Foobar</h1>');
  }, 2_000);
})

app.on('window-all-closed', e => e.preventDefault());