October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Puppeteer CoverageEntry: What It Contains

A Puppeteer CoverageEntry holds resource text, its URL, and covered position ranges. See how JavaScript entries and coverage options differ.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Puppeteer CoverageEntry describes one stylesheet or script in a coverage report. It contains the resource’s full text, a URL, and ranges marking portions of that text reported as covered. JavaScript reports use the more specific JSCoverageEntry type, which can also include raw V8 coverage data.

What a CoverageEntry contains

The base CoverageEntry interface has three properties:

Property What it represents
ranges An array of { start, end } positions identifying covered portions of the resource text.
text The stylesheet or script content associated with the entry.
url The stylesheet or script URL.

The range positions refer to locations in text. They are not source-map objects, and the entry does not itself provide a ready-calculated coverage percentage.

How JavaScript and CSS coverage reports differ

Puppeteer’s Coverage API can collect JavaScript and CSS usage information. The corresponding reports are arrays of entries; JavaScript entries use JSCoverageEntry, which extends CoverageEntry and may include rawScriptCoverage, the raw V8 script coverage entry. See the JSCoverageEntry reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The official example starts coverage, exercises or navigates the page, then stops collection. It combines the JavaScript and CSS report arrays, totals resource text lengths, and sums range lengths using end - start - 1 to estimate used bytes. A percentage must be calculated from those totals; it is not a field on each entry. The Coverage class documentation shows this pattern.

What stopJSCoverage() returns

stopJSCoverage() returns an array of JavaScript coverage entries. Anonymous scripts are omitted by default. These include dynamically created scripts without an associated URL, such as scripts created with eval or new Function. If anonymous scripts are included, Puppeteer reports them using a debugger://VM URL unless a //# sourceURL comment provides another name.

Collection options that affect entries

Coverage options change what Puppeteer collects, not the three base fields of a CoverageEntry. The documented JavaScript options include:

  • Granularity: JavaScript coverage defaults to block-level collection; function-level collection is another documented choice.
  • Anonymous scripts: Omitted by default; an option can include them.
  • Raw V8 data: Not included by default; an option can request it.
  • Navigation reset: Coverage resets on navigation by default.

Refer to the JSCoverageOptions reference for the option names and current API details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Navigation and preserving coverage

Setting resetOnNavigation to false does not guarantee coverage will survive navigation: Chrome may discard the previous page’s execution environment and its coverage data. When collecting across pages, stop coverage before leaving a page, start a new collection for the next page, and merge the resulting reports if that is appropriate for your analysis. The navigation caveat is documented in the JavaScript coverage options.

Turn coverage reports into Istanbul format

Puppeteer’s Coverage class documentation points to puppeteer-to-istanbul for converting coverage output into a format Istanbul can consume. This is useful when the next step in a test or reporting workflow expects Istanbul-compatible coverage rather than Puppeteer’s range-based entries.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup: capture a page screenshot

Coverage reports show which code ranges ran; they do not create a visual record of the page. If your task is to capture the rendered page, ScreenshotNeo provides a one-request screenshot API rather than a Puppeteer browser-setup workflow. For API parameters and options, see the ScreenshotNeo documentation.

For example, save a rendered page as WebP with cURL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for the free plan.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.