|
@@ -17,7 +17,7 @@ exports.module = function(phantomas) {
|
|
|
phantomas.setMetric('jQueryOnDOMReadyFunctions'); // @desc number of functions bound to onDOMReady event
|
|
|
phantomas.setMetric('jQueryWindowOnLoadFunctions'); // @desc number of functions bound to windowOnLoad event
|
|
|
phantomas.setMetric('jQuerySizzleCalls'); // @desc number of calls to Sizzle (including those that will be resolved using querySelectorAll)
|
|
|
- //phantomas.setMetric('jQueryEventTriggers'); // @desc number of jQuery event triggers
|
|
|
+ phantomas.setMetric('jQueryEventTriggers'); // @desc number of jQuery event triggers
|
|
|
|
|
|
var jQueryFunctions = [
|
|
|
// DOM manipulations
|
|
@@ -245,7 +245,7 @@ exports.module = function(phantomas) {
|
|
|
});
|
|
|
|
|
|
|
|
|
- /*if (!jQuery.event) {
|
|
|
+ if (!jQuery.event) {
|
|
|
phantomas.spy(jQuery.event, 'trigger', function(ev, data, elem) {
|
|
|
var path = phantomas.getDOMPath(elem),
|
|
|
type = ev.type || ev;
|
|
@@ -255,7 +255,7 @@ exports.module = function(phantomas) {
|
|
|
phantomas.incrMetric('jQueryEventTriggers');
|
|
|
phantomas.addOffender('jQueryEventTriggers', '"%s" on "%s"', type, path);
|
|
|
});
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
// jQuery events bound to window' onLoad event (#451)
|
|
|
phantomas.spy(jQuery.fn, 'on', function(eventName, func) {
|