puppeteer/assets/js/9b7d7cc7.458cb806.js

2 lines
8.3 KiB
JavaScript
Raw Normal View History

/*! For license information please see 9b7d7cc7.458cb806.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[41784],{840:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>d,metadata:()=>o,toc:()=>l});var t=n(85893),i=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/../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.removeListener",permalink:"/next/api/puppeteer.commoneventemitter.removelistener"},next:{title:"connect",permalink:"/next/api/puppeteer.connect"}},c={},l=[{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,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"configuration-interface",children:"Configuration interface"}),"\n",(0,t.jsx)(r.p,{children:"Defines options to configure Puppeteer's behavior during installation and runtime."}),"\n",(0,t.jsx)(r.p,{children:"See individual properties for more information."}),"\n",(0,t.jsx)(r.h4,{id:"signature",children:"Signature:"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-typescript",children:"export interface Configuration\n"})}),"\n",(0,t.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Property"}),(0,t.jsx)(r.th,{children:"Modifiers"}),(0,t.jsx)(r.th,{children:"Type"}),(0,t.jsx)(r.th,{children:"Description"}),(0,t.jsx)(r.th,{children:"Default"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"browserRevision"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Specifies a certain version of the browser you'd like Puppeteer to use."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_BROWSER_REVISION"}),"."]}),(0,t.jsxs)("p",{children:["See ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.puppeteernode.launch",children:"puppeteer.launch"})," on how executable path is inferred."]})]}),(0,t.jsx)(r.td,{children:"A compatible-revision of the browser."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"cacheDirectory"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Defines the directory to be used by Puppeteer for caching."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_CACHE_DIR"}),"."]})]}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"path.join(os.homedir(), '.cache', 'puppeteer')"})})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"defaultProduct"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:(0,t.jsx)(r.a,{href:"/next/api/puppeteer.product",children:"Product"})}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Specifies which browser you'd like Puppeteer to use."}),(0,t.jsxs)("p",{children:["Can be overridden by ",(0,t.jsx)("code",{children:"PUPPETEER_PRODUCT"}),"."]})]}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"chrome"})})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"downloadBaseUrl"}),(0,t.jsx)(r.td,{children:(0,t.jsx)("code",{children:"optional"})}),(0,t.jsx)(r.td,{children:"string"}),(0,t.jsxs)(r.td,{children:[(0,t.jsx)("p",{children:"Specifies the URL prefix that is used to download the browser."}),(0,t.jsxs)("p",{children:["Can be ove