Fix JSON cyclic problem

This commit is contained in:
Gaël Métais
2014-11-20 17:54:41 +01:00
parent e3d96de203
commit 7af3bc519a
+1 -23
View File
@@ -62,6 +62,7 @@ exports.module = function(phantomas) {
'delegate',
'undelegate',
'one',
'bind',
'unbind',
// more events
@@ -182,29 +183,6 @@ exports.module = function(phantomas) {
phantomas.leaveContext(moreData);
}) || phantomas.log('jQuery: can not measure jQuerySizzleCalls (jQuery used on the page is too old)!');
// $().bind - jQuery.bind
// works for jQuery v?.?
phantomas.spy(jQueryFn, 'bind', function(eventTypes, func) {
phantomas.enterContext({
type: 'jQuery - bind',
callDetails: {
context: {
length: this.length,
firstElementPath: phantomas.getDOMPath(this[0]),
selector: this.selector
},
arguments: [eventTypes, func]
},
backtrace: phantomas.getBacktrace()
});
}, function(result) {
phantomas.leaveContext();
}) || phantomas.log('jQuery: can not measure jQueryBindCalls (jQuery used on the page is too old)!');
// Add spys on many jQuery functions
jQueryFunctions.forEach(function(functionName) {