@@ -365,7 +365,12 @@ exports.module = function(phantomas) {
phantomas.log('DOM query: by %s - "%s" (using %s) in %s', type, query, fnName, context);
phantomas.incrMetric('DOMqueries');
- if (context && context.indexOf('DocumentFragment') === -1) {
+ if (context && (
+ context.indexOf('html') === 0 ||
+ context.indexOf('body') === 0 ||
+ context.indexOf('head') === 0 ||
+ context.indexOf('#document') === 0
+ )) {
DOMqueries.push(type + ' "' + query + '" with ' + fnName + ' (in context ' + context + ')');
}
});