Code coverage
coverageMeasure unused CSS and JavaScript per file: start recording, exercise the page, then stop to identify code that was not used.
Instructions
Measures unused CSS and JavaScript per file like the DevTools Coverage panel. Call with action "start", exercise the page, then "stop". CSS coverage always works; JavaScript coverage needs the full DevTools channel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Show at most this many files (default 30). | |
| tabId | No | Tab to act on. Defaults to the session target tab (see tab_select). | |
| types | No | What to measure (default both). | |
| action | Yes | Start or stop measuring. | |
| reload | No | Reload the page right after starting, to cover page load (default false). |