mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
|
/*! For license information please see 9b7d7cc7.16b0038b.js.LICENSE.txt */
|
||
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[41784],{840:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>d,metadata:()=>l,toc:()=>o});var i=n(85893),s=n(11151);const d={sidebar_label:"Configuration"},t="Configuration interface",l={id:"api/puppeteer.configuration",title:"Configuration interface",description:"Defines options to configure Puppeteer's behavior during installation and runtime.",source:"@site/../docs/api/puppeteer.configuration.md",sourceDirName:"api",slug:"/api/puppeteer.configuration",permalink:"/next/api/puppeteer.configuration",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Configuration"},sidebar:"api",previous:{title:"CommonEventEmitter.removeAllListeners",permalink:"/next/api/puppeteer.commoneventemitter.removealllisteners"},next:{title:"connect",permalink:"/next/api/puppeteer.connect"}},c={},o=[{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",...(0,s.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)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:(0,i.jsx)(r.p,{children:"Property"})}),(0,i.jsx)("th",{children:(0,i.jsx)(r.p,{children:"Modifiers"})}),(0,i.jsx)("th",{children:(0,i.jsx)(r.p,{children:"Type"})}),(0,i.jsx)("th",{children:(0,i.jsx)(r.p,{children:"Description"})}),(0,i.jsx)("th",{children:(0,i.jsx)(r.p,{children:"Default"})})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)("span",{id:"browserrevision",children:"browserRevision"})}),(0,i.jsx)("td",{children:(0,i.jsx)(r.p,{children:(0,i.jsx)(r.code,{children:"optional"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(r.p,{children:"string"})}),(0,i.jsxs)("td",{children:[(0,i.jsx)(r.p,{children:"Specifies a certain version of the browser you'd like Puppeteer to use."}),(0,i.jsxs)(r.p,{children:["Can be overridden by ",(0,i.jsx)(r.code,{children:"PUPPETEER_BROWSER_REVISION"}),"."]}),(0,i.jsxs)(r.p,{children:["See ",(0,i.jsx)(r.a,{href:"/next/api/puppeteer.puppeteernode.launch",children:"puppeteer.launch"})," on how executable path is inferred."]}),(0,i.jsxs)(r.p,{children:["Use a specific browser version (e.g., 119.0.6045.105). If you use an alias such ",(0,i.jsx)(r.code,{children:"stable"})," or ",(0,i.jsx)(r.code,{children:"canary"})," it will only work during the installation of Puppeteer and it will fail when launching the browser."]})]}),(0,i.jsx)("td",{children:(0,i.jsx)(r.p,{children:"The pinned browser version supported by the current Puppeteer version."})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)("span",{id:"cachedirectory",children:"cacheDirectory"})}),(0,i.jsx)("td",{children:(0,i.jsx)(r.p,{children:(0,i.jsx)(r.code,{children:"optional"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(r.p,{children:"string"})}),(0,i.jsxs)("td",{children:[(0,i.jsx)(r.p,{children:"Defines the directory to be used by Puppeteer for caching."}),(0,i.jsxs)(r.p,{children:["Can be overridden by ",(0,i.jsx)(r.code,{children:"PUPPETEER_CACHE_DIR"}),"."]})]}),(0,i.jsx)("td",{children:(0,i.jsx)(r.p,{children:(0,i.jsx)(r.code,{children:"path.join(os.homedir(), '.cache', 'puppeteer')"})})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)("span",{id:"defaultproduct",children:"defaultProduct"})}),(0,i.jsx)("td",{children:(0,i.jsx)(r.p,{children:(0,i.jsx)(r.code,{childr
|