code: function getSelectionRects() {
    try {
      let selection = window.getSelection();
      let range = selection.getRangeAt(0);
      let rects = range.getClientRects();
  
      if (rects.length > 0 &&
          rects[0].width > 0 &&
          rects[0].height > 0) {
        return rects;
      }
    } catch (e) {}
    
    return null;
  }
docs: Get the current window selection as rects
  
  @return {Array} An Array of rects