 global = globalThis;

      if (window.location.search.match('worker')) {
        let handlerHasRun = false;

        window['_startupErrorHandler'] = event => {
          if (handlerHasRun) return;
          handlerHasRun = true;

          const electron = require('electron');
          electron.ipcRenderer.send('startupError', event && event.message || 'Script load error');
        }

        window.addEventListener('error', window['_startupErrorHandler']);
      }
    </script>
    <script defer src="s