puppeteer/assets/js/f92ae21e.845d1c19.js

2 lines
9.5 KiB
JavaScript
Raw Normal View History

/*! For license information please see f92ae21e.845d1c19.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[70037],{41544:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>s,default:()=>a,frontMatter:()=>d,metadata:()=>o,toc:()=>c});var i=n(85893),t=n(11151);const d={sidebar_label:"Configuration"},s="Configuration interface",o={id:"api/puppeteer.configuration",title:"Configuration interface",description:"Defines options to configure Puppeteer's behavior during installation and runtime.",source:"@site/versioned_docs/version-21.11.0/api/puppeteer.configuration.md",sourceDirName:"api",slug:"/api/puppeteer.configuration",permalink:"/api/puppeteer.configuration",draft:!1,unlisted:!1,tags:[],version:"21.11.0",frontMatter:{sidebar_label:"Configuration"},sidebar:"api",previous:{title:"CommonEventEmitter.removeListener",permalink:"/api/puppeteer.commoneventemitter.removelistener"},next:{title:"connect",permalink:"/api/puppeteer.connect"}},l={},c=[{value:"Signature:",id:"signature",level:4},{value:"Properties",id:"properties",level:2}];function h(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.h1,{id:"configuration-interface",children:"Configuration interface"}),"\n",(0,i.jsx)(r.p,{children:"Defines options to configure Puppeteer's behavior during installation and runtime."}),"\n",(0,i.jsx)(r.p,{children:"See individual properties for more information."}),"\n",(0,i.jsx)(r.h4,{id:"signature",children:"Signature:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-typescript",children:"export interface Configuration\n"})}),"\n",(0,i.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Property"}),(0,i.jsx)(r.th,{children:"Modifiers"}),(0,i.jsx)(r.th,{children:"Type"}),(0,i.jsx)(r.th,{children:"Description"}),(0,i.jsx)(r.th,{children:"Default"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"browserRevision"}),(0,i.jsx)(r.td,{children:(0,i.jsx)("code",{children:"optional"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsxs)(r.td,{children:[(0,i.jsx)("p",{children:"Specifies a certain version of the browser you'd like Puppeteer to use."}),(0,i.jsxs)("p",{children:["Can be overridden by ",(0,i.jsx)("code",{children:"PUPPETEER_BROWSER_REVISION"}),"."]}),(0,i.jsxs)("p",{children:["See ",(0,i.jsx)(r.a,{href:"/api/puppeteer.puppeteernode.launch",children:"puppeteer.launch"})," on how executable path is inferred."]}),(0,i.jsxs)("p",{children:["Use a specific browser version (e.g., 119.0.6045.105). If you use an alias such ",(0,i.jsx)("code",{children:"stable"})," or ",(0,i.jsx)("code",{children:"canary"})," it will only work during the installation of Puppeteer and it will fail when launching the browser."]})]}),(0,i.jsx)(r.td,{children:"The pinned browser version supported by the current Puppeteer version."})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"cacheDirectory"}),(0,i.jsx)(r.td,{children:(0,i.jsx)("code",{children:"optional"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsxs)(r.td,{children:[(0,i.jsx)("p",{children:"Defines the directory to be used by Puppeteer for caching."}),(0,i.jsxs)("p",{children:["Can be overridden by ",(0,i.jsx)("code",{children:"PUPPETEER_CACHE_DIR"}),"."]})]}),(0,i.jsx)(r.td,{children:(0,i.jsx)("code",{children:"path.join(os.homedir(), '.cache', 'puppeteer')"})})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:"defaultProduct"}),(0,i.jsx)(r.td,{children:(0,i.jsx)("code",{children:"optional"})}),(0,i.jsx)(r.td,{children:(0,i.jsx)(r.a,{href:"/api/puppeteer.product",children:"Product"})}),(0,i.jsxs)(r.td,{children:[(0,i.jsx)("p",{children:"Specifies which browser you'd like Puppeteer to use."}),(0,i.jsxs)("p",{children:["Can be overridden by ",(0,i.jsx)("code",{children:"PUPPETEER_PRODUCT"}),"."]})]}),(0,i.jsx)(r.td,{children:(0,i.jsx)("code",{children:"chrome"})})]})