parent
96b416c3b9
commit
e14256010d
@ -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()
|
||||
|
||||
|
@ -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<void> {
|
||||
return await this._jsCoverage.start(options);
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user