code: function (selector) {
          if (typeof selector == 'function') {
            return DomQuery(grep(this.toArray(), function (item, i) {
              return selector(i, item);
            }));
          }
  
          return DomQuery(DomQuery.filter(selector, this.toArray()));
        }
docs: Filters the current set with the specified selector.
  
  @method filter
  @param {String/function} selector Selector to filter elements by.
  @return {tinymce.dom.DomQuery} Set with filtered elements.