phantomas
Version:
Headless Chromium-based web performance metrics collector and monitoring tool
12 lines (10 loc) • 478 B
JavaScript
/**
* Analyzes DOM changes via MutationObserver API
*/
;
module.exports = (phantomas) => {
// @see http://dev.opera.com/articles/mutation-observers-tutorial/
phantomas.setMetric("DOMmutationsInserts"); // @desc number of <body> node inserts @offenders
phantomas.setMetric("DOMmutationsRemoves"); // @desc number of <body> node removes @offenders
phantomas.setMetric("DOMmutationsAttributes"); // @desc number of DOM nodes attributes changes @offenders
};