src/backend/highlighter.js
function showOverlay ({ width = 0, height = 0, top = 0, left = 0 }, content = []) {
  if (!isBrowser) return

  overlay.style.width = ~~width + 'px'
  overlay.style.height = ~~height + 'px'
  overlay.style.top = ~~top + 'px'
  overlay.style.left = ~~left + 'px'

  overlayContent.innerHTML = ''
  content.forEach(child => overlayContent.appendChild(child))

  document.body.appendChild(overlay)
}
function showOverlay ({ width = 0, height = 0, top = 0, left = 0 }, content = []) {
  if (!isBrowser) return

  overlay.style.width = ~~width + 'px'
  overlay.style.height = ~~height + 'px'
  overlay.style.top = ~~top + 'px'
  overlay.style.left = ~~left + 'px'

  overlayContent.innerHTML = ''
  content.forEach(child => overlayContent.appendChild(child))

  document.body.appendChild(overlay)
}
function showOverlay ( { width = 0 , height = 0 , top = 0 , left = 0 } , content = [ ] ) { if ( ! isBrowser ) return overlay . style . width = ~ ~ width + 'px' overlay . style . height = ~ ~ height + 'px' overlay . style . top = ~ ~ top + 'px' overlay . style . left = ~ ~ left + 'px' overlayContent . innerHTML = '' content . forEach ( child => overlayContent . appendChild ( child ) ) document . body . appendChild ( overlay ) }
Display the overlay with given rect.

@param {Rect}
Display the overlay with given rect .