Browse Source

Spy scrollBounds on document too

Gaël Métais 10 năm trước cách đây
mục cha
commit
385de967a4

+ 1 - 1
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());
                     }