From 385de967a47c2838acf5b48a10d728d9355c2592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Tue, 5 May 2015 13:29:20 +0200 Subject: [PATCH] Spy scrollBounds on document too --- lib/tools/phantomas/custom_modules/modules/eventYLT/eventYLT.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tools/phantomas/custom_modules/modules/eventYLT/eventYLT.js b/lib/tools/phantomas/custom_modules/modules/eventYLT/eventYLT.js index aa75f75..8409fbd 100644 --- a/lib/tools/phantomas/custom_modules/modules/eventYLT/eventYLT.js +++ b/lib/tools/phantomas/custom_modules/modules/eventYLT/eventYLT.js @@ -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()); }