Spy scrollBounds on document too

This commit is contained in:
Gaël Métais
2015-05-05 13:29:20 +02:00
parent ac84019777
commit 385de967a4
@@ -39,7 +39,7 @@ exports.module = function(phantomas) {
});
// count window.addEventListener('scroll', ...) - issue #508
if (eventType === 'scroll' && path === 'window') {
if (eventType === 'scroll' && (path === 'window' || path === '#document')) {
phantomas.incrMetric('eventsScrollBound');
phantomas.addOffender('eventsScrollBound', 'bound by %s', phantomas.getBacktrace());
}