ive != null) {
            pdftex.preload()
          }
        }).catch(function (error) {
          // registration failed
          console.log('Pdftex service worker registration failed with ' + error)
        })
      }
      window.compile = function compile () {
        var source = document.querySelector('#editor').value
        var compile = pdftex(source, { debug: true }) // eslint-disable-line
        var pre = document.querySelector('#log')
        pre.textContent = ''

        compile.on('finis