code: function _getSelectedNode(container, offset) {
          var child;
  
          // TEXT_NODE
          if (container.nodeType == 3) {
            return container;
          }
  
          if (offset < 0) {
            return container;
          }
  
          child = container.firstChild;
          while (child && offset > 0) {
            --offset;
            child = child.nextSibling;
          }
  
          if (child) {
            return child;
          }
  
          return container;
        }
docs: Private methods