startJSCoverage method
Parameters:
resetOnNavigation
Whether to reset coverage on every navigation. Defaults totrue
.reportAnonymousScripts
: Whether anonymous scripts generated by the page should be reported. Defaults tofalse
.
Returns a Future 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
ornew Function
. IfreportAnonymousScripts
is set totrue
, anonymous scripts will have__puppeteer_evaluation_script__
as their URL.
Implementation
Future<void> startJSCoverage(
{bool? resetOnNavigation, bool? reportAnonymousScripts}) {
return _jsCoverage.start(
resetOnNavigation: resetOnNavigation,
reportAnonymousScripts: reportAnonymousScripts);
}