+ is: function(query) {
+ if(typeof query === 'string') {
+ query = {klass: query};
+ }
+ return (_.isUndefined(query.klass) || this.getClass().substr(0, query.klass.length) === query.klass) &&
+ (_.isUndefined(query.tagName) || this.getTagName() === query.tagName);
+ },
+ hasChild: function(query) {
+ return this.contents().some(function(child) {
+ return child.is(query);
+ }.bind(this));