UNPKG

@puberty-labs/clits

Version:

CLiTS (Chrome Logging and Inspection Tool Suite) is a powerful Node.js library for AI-controlled Chrome browser automation, testing, and inspection. Features enhanced CSS selector support (:contains(), XPath), dry-run mode, element discovery tools, and co

19 lines (15 loc) 724 B
// BSD: Injects a script into the browser context to monitor the event loop for long animation frames and report them via console logs. export const EVENT_LOOP_MONITOR_SCRIPT = ` (function() { if (typeof PerformanceObserver === 'undefined' || !PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')) { console.warn('[CLiTS-EventLoop-Monitor] Long Animation Frames API not supported. Skipping event loop monitoring.'); return; } const observer = new PerformanceObserver((list) => { for (const entry of list.getEntries()) { // Long animation frame monitoring active (removed noisy logging) } }); observer.observe({ type: 'long-animation-frame', buffered: true }); })(); `;