eWorker.register('sw.js').then(registration => {
        console.log('ServiceWorker registration successful with scope:',
                    registration.scope);
      }).catch(err => {
        console.error('ServiceWorker registration failed:', err);
      });
    }

    function logText(message, isError) {
      if (isError)
        console.error(message);
      else
        console.log(message);
      var p = document.createElement('p');
      if (isError)
        p.setAttribute('class', 'error');
     