src/backend/highlighter.js
function getTextRect (node) {
  if (!isBrowser) return
  if (!range) range = document.createRange()

  range.selectNode(node)

  return range.getBoundingClientRect()
}
function getTextRect (node) {
  if (!isBrowser) return
  if (!range) range = document.createRange()

  range.selectNode(node)

  return range.getBoundingClientRect()
}
function getTextRect ( node ) { if ( ! isBrowser ) return if ( ! range ) range = document . createRange ( ) range . selectNode ( node ) return range . getBoundingClientRect ( ) }
Get the bounding rect for a text node using a Range.

@param {Text} node
@return {Rect}
Get the bounding rect for a text node using a Range .