tinymce.full.js
function (selector, context) {
        var self = this, match, node;

        if (!selector) {
          return self;
        }

        if (selector.nodeType) {
          self.context = self[0] = selector;
          self.length = 1;

          return self;
        }

        if (context && context.nodeType) {
          self.context = context;
        } else {
          if (context) {
            return DomQuery(selector).attr(context);
          }

          self.context = context = document;
        }

        if (isString(selector)) {
          self.selector = selector;

          if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
            match = [null, selector, null];
          } else {
            match = rquickExpr.exec(selector);
          }

          if (match) {
            if (match[1]) {
              node = createFragment(selector, getElementDocument(context)).firstChild;

              while (node) {
                push.call(self, node);
                node = node.nextSibling;
              }
            } else {
              node = getElementDocument(context).getElementById(match[2]);

              if (!node) {
                return self;
              }

              if (node.id !== match[2]) {
                return self.find(selector);
              }

              self.length = 1;
              self[0] = node;
            }
          } else {
            return DomQuery(context).find(selector);
          }
        } else {
          this.add(selector, false);
        }

        return self;
      }
function (selector, context) {
        var self = this, match, node;

        if (!selector) {
          return self;
        }

        if (selector.nodeType) {
          self.context = self[0] = selector;
          self.length = 1;

          return self;
        }

        if (context && context.nodeType) {
          self.context = context;
        } else {
          if (context) {
            return DomQuery(selector).attr(context);
          }

          self.context = context = document;
        }

        if (isString(selector)) {
          self.selector = selector;

          if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
            match = [null, selector, null];
          } else {
            match = rquickExpr.exec(selector);
          }

          if (match) {
            if (match[1]) {
              node = createFragment(selector, getElementDocument(context)).firstChild;

              while (node) {
                push.call(self, node);
                node = node.nextSibling;
              }
            } else {
              node = getElementDocument(context).getElementById(match[2]);

              if (!node) {
                return self;
              }

              if (node.id !== match[2]) {
                return self.find(selector);
              }

              self.length = 1;
              self[0] = node;
            }
          } else {
            return DomQuery(context).find(selector);
          }
        } else {
          this.add(selector, false);
        }

        return self;
      }
function ( selector , context ) { var self = this , match , node ; if ( ! selector ) { return self ; } if ( selector . nodeType ) { self . context = self [ 0 ] = selector ; self . length = 1 ; return self ; } if ( context && context . nodeType ) { self . context = context ; } else { if ( context ) { return DomQuery ( selector ) . attr ( context ) ; } self . context = context = document ; } if ( isString ( selector ) ) { self . selector = selector ; if ( selector . charAt ( 0 ) === "<" && selector . charAt ( selector . length - 1 ) === ">" && selector . length >= 3 ) { match = [ null , selector , null ] ; } else { match = rquickExpr . exec ( selector ) ; } if ( match ) { if ( match [ 1 ] ) { node = createFragment ( selector , getElementDocument ( context ) ) . firstChild ; while ( node ) { push . call ( self , node ) ; node = node . nextSibling ; } } else { node = getElementDocument ( context ) . getElementById ( match [ 2 ] ) ; if ( ! node ) { return self ; } if ( node . id !== match [ 2 ] ) { return self . find ( selector ) ; } self . length = 1 ; self [ 0 ] = node ; } } else { return DomQuery ( context ) . find ( selector ) ; } } else { this . add ( selector , false ) ; } return self ; }
Constructs a new DomQuery instance with the specified selector or context.

@constructor
@method init
@param {String/Array/DomQuery} selector Optional CSS selector/Array or array like object or HTML string.
@param {Document/Element} context Optional context to search in.
Constructs a new DomQuery instance with the specified selector or context .