code: function (selector) {
          var result = [];
  
          if (selector instanceof DomQuery) {
            selector = selector[0];
          }
  
          this.each(function (i, node) {
            while (node) {
              if (typeof selector == 'string' && DomQuery(node).is(selector)) {
                result.push(node);
                break;
              } else if (node == selector) {
                result.push(node);
                break;
              }
  
              node = node.parentNode;
            }
          });
  
          return DomQuery(result);
        }
docs: Gets the current node or any parent matching the specified selector.
  
  @method closest
  @param {String/Element/tinymce.dom.DomQuery} selector Selector or element to find.
  @return {tinymce.dom.DomQuery} Set with closest elements.