"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[47159],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return m}});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),c=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},v=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),v=c(r),m=a,d=v["".concat(i,".").concat(m)]||v[m]||l[m]||o;return r?n.createElement(d,p(p({ref:t},u),{},{components:r})):n.createElement(d,p({ref:t},u))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,p=new Array(o);p[0]=v;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,p[1]=s;for(var c=2;c"," ",(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/puppeteer"},"puppeteer")," ",">"," ",(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/puppeteer.coverage"},"Coverage")," ",">"," ",(0,o.kt)("a",{parentName:"p",href:"/puppeteer/docs/10.0.0/puppeteer.coverage.startjscoverage"},"startJSCoverage")),(0,o.kt)("h2",{id:"coveragestartjscoverage-method"},"Coverage.startJSCoverage() method"),(0,o.kt)("b",null,"Signature:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-typescript"},"startJSCoverage(options?: JSCoverageOptions): Promise;\n")),(0,o.kt)("h2",{id:"parameters"},"Parameters"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"options"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/puppeteer/docs/10.0.0/puppeteer.jscoverageoptions"},"JSCoverageOptions")),(0,o.kt)("td",{parentName:"tr",align:null},"Set of configurable options for coverage defaults to ",(0,o.kt)("code",null,"resetOnNavigation : true, reportAnonymousScripts : false"))))),(0,o.kt)("b",null,"Returns:"),(0,o.kt)("p",null,"Promise","<","void",">"),(0,o.kt)("p",null,"Promise that resolves when coverage is started."),(0,o.kt)("h2",{id:"remarks"},"Remarks"),(0,o.kt)("p",null,"Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using ",(0,o.kt)("inlineCode",{parentName:"p"},"eval")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"new Function"),". If ",(0,o.kt)("inlineCode",{parentName:"p"},"reportAnonymousScripts")," is set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true"),", anonymous scripts will have ",(0,o.kt)("inlineCode",{parentName:"p"},"__puppeteer_evaluation_script__")," as their URL."))}v.isMDXComponent=!0}}]);