Fix #39 Error 1001 when using the Node module

This commit is contained in:
Gaël Métais
2015-01-15 12:34:47 +01:00
parent 6521d24925
commit 0f00111373
5 changed files with 59 additions and 33 deletions
@@ -289,7 +289,7 @@ exports.module = function(phantomas) {
// count DOM queries by either ID, tag name, class name and selector query
// @see https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-document-doctype
var Collection = require('../../../../../../node_modules/phantomas/lib/collection'),
var Collection = require('../../util/collection'),
DOMqueries = new Collection();
phantomas.on('domQuery', function(type, query, fnName, context) {
@@ -276,7 +276,7 @@ exports.module = function(phantomas) {
// count Sizzle calls to detect duplicated queries
var Collection = require('../../../../../../node_modules/phantomas/lib/collection'),
var Collection = require('../../util/collection'),
sizzleCalls = new Collection(),
jQueryLoading = new Collection();
@@ -1,29 +0,0 @@
/**
* Meters the number of page errors, and provides traces as offenders for "jsErrors" metric
*/
exports.version = '0.0';
exports.module = function(phantomas) {
'use strict';
/*phantomas.on('recv', function(entry, res) {
if (!entry.isJS) {
return;
}
// Yeah, this is weird, i'm sending the information back to the browser...
phantomas.evaluate(function(url) {
(function(phantomas) {
phantomas.pushContext({
type: 'script loaded',
callDetails: {
arguments: [url]
}
});
})(window.__phantomas);
}, entry.url);
});*/
};