diff --git a/docs/api/puppeteer.coverage.startjscoverage.md b/docs/api/puppeteer.coverage.startjscoverage.md index 041897d021d44..1bb6a09e3ba08 100644 --- a/docs/api/puppeteer.coverage.startjscoverage.md +++ b/docs/api/puppeteer.coverage.startjscoverage.md @@ -26,4 +26,4 @@ Promise that resolves when coverage is started. ## Remarks -Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using `eval` or `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous scripts will have `pptr://__puppeteer_evaluation_script__` as their URL. +Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using `eval` or `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous scripts URL will start with `debugger://VM` (unless a magic //\# sourceURL comment is present, in which case that will the be URL). diff --git a/src/common/Coverage.ts b/src/common/Coverage.ts index a75a772a6980c..a41f7b4709e40 100644 --- a/src/common/Coverage.ts +++ b/src/common/Coverage.ts @@ -142,7 +142,8 @@ export class Coverage { * Anonymous scripts are ones that don't have an associated url. These are * scripts that are dynamically created on the page using `eval` or * `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous - * scripts will have `pptr://__puppeteer_evaluation_script__` as their URL. + * scripts URL will start with `debugger://VM` (unless a magic //# sourceURL + * comment is present, in which case that will the be URL). */ async startJSCoverage(options: JSCoverageOptions = {}): Promise { return await this.#jsCoverage.start(options);