message: reconnect WebSocket after closed by sleep and wake.
diff: @@ -151,7 +151,9 @@ for (let i = 0, ii = parts.length; i < ii; ++i) {
  const server = `ws://${window.location.hostname}:${window.location.port}`
  let reverseSynctexKeybinding
  -const socket = new WebSocket(server)
  +let socket = new WebSocket(server)
  +
  +function setupWebSocket() {
  socket.addEventListener('open', () => socket.send(JSON.stringify({type:'open', path:pdfFilePath, viewer:(embedded ? 'tab' : 'browser')})))
  socket.addEventListener('message', (event) => {
  const data = JSON.parse(event.data)
  @@ -245,7 +247,18 @@ socket.addEventListener('message', (event) => {
  break
  }
  })
  -socket.onclose = () => { document.title = `[Disconnected] ${document.title}` }
  + socket.onclose = () => {
  + setTimeout( () => {
  + try {
  + socket = new WebSocket(server)
  + setupWebSocket()
  + } catch(e) {
  + document.title = `[Disconnected] ${document.title}`
  + }
  + }, 3000)
  + }
  +}
  +setupWebSocket()
  document.addEventListener('pagesinit', () => {
  // check whether WebSocket is open (readyState === 1).
  