diff --git a/docs/api.md b/docs/api.md index 28eca442ec9bd..606eb7f56a5d8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -5482,7 +5482,7 @@ see [puppeteer-to-istanbul](https://github.com/istanbuljs/puppeteer-to-istanbul) - `reportAnonymousScripts` <[boolean]> Whether anonymous scripts generated by the page should be reported. Defaults to `false`. - returns: <[Promise]> Promise that resolves when coverage is started -> **NOTE** 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 `__puppeteer_evaluation_script__` as their URL. +> **NOTE** 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. #### coverage.stopCSSCoverage() diff --git a/src/common/Coverage.ts b/src/common/Coverage.ts index a77c4d1739ad5..286e5c426c2f2 100644 --- a/src/common/Coverage.ts +++ b/src/common/Coverage.ts @@ -146,7 +146,7 @@ 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 `__puppeteer_evaluation_script__` as their URL. + * scripts will have `pptr://__puppeteer_evaluation_script__` as their URL. */ async startJSCoverage(options: JSCoverageOptions = {}): Promise { return await this._jsCoverage.start(options); diff --git a/src/common/ExecutionContext.ts b/src/common/ExecutionContext.ts index 4ab47b527288f..3cddaa2e1f49e 100644 --- a/src/common/ExecutionContext.ts +++ b/src/common/ExecutionContext.ts @@ -25,7 +25,7 @@ import { EvaluateHandleFn, SerializableOrJSHandle } from './EvalTypes.js'; /** * @public */ -export const EVALUATION_SCRIPT_URL = '__puppeteer_evaluation_script__'; +export const EVALUATION_SCRIPT_URL = 'pptr://__puppeteer_evaluation_script__'; const SOURCE_URL_REGEX = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m; /**