puppeteer/assets/js/728bf073.e9ba2df4.js

2 lines
41 KiB
JavaScript
Raw Normal View History

/*! For license information please see 728bf073.e9ba2df4.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[89774],{66261:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>d,default:()=>l,frontMatter:()=>i,metadata:()=>p,toc:()=>c});var s=t(85893),n=t(11151);const i={sidebar_label:"API"},d="API Reference",p={id:"api/index",title:"API Reference",description:"Classes",source:"@site/../docs/api/index.md",sourceDirName:"api",slug:"/api/",permalink:"/next/api/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"API"}},a={},c=[{value:"Classes",id:"classes",level:2},{value:"Enumerations",id:"enumerations",level:2},{value:"Functions",id:"functions",level:2},{value:"Interfaces",id:"interfaces",level:2},{value:"Namespaces",id:"namespaces",level:2},{value:"Variables",id:"variables",level:2},{value:"Type Aliases",id:"type-aliases",level:2}];function h(e){const r={a:"a",h1:"h1",h2:"h2",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h1,{id:"api-reference",children:"API Reference"}),"\n",(0,s.jsx)(r.h2,{id:"classes",children:"Classes"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Class"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"/next/api/puppeteer.accessibility",children:"Accessibility"})}),(0,s.jsxs)(r.td,{children:["The Accessibility class provides methods for inspecting the browser's accessibility tree. The accessibility tree is used by assistive technology such as ",(0,s.jsx)(r.a,{href:"https://en.wikipedia.org/wiki/Screen_reader",children:"screen readers"})," or ",(0,s.jsx)(r.a,{href:"https://en.wikipedia.org/wiki/Switch_access",children:"switches"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browser",children:"Browser"})}),(0,s.jsxs)(r.td,{children:[(0,s.jsxs)("p",{children:[(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browser",children:"Browser"})," represents a browser instance that is either:"]}),(0,s.jsxs)("p",{children:["- connected to via ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.puppeteer.connect",children:"Puppeteer.connect()"})," or - launched by ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.puppeteernode.launch",children:"PuppeteerNode.launch()"}),"."]}),(0,s.jsxs)("p",{children:[(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browser",children:"Browser"})," ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.eventemitter",children:"emits"})," various events which are documented in the ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browserevent",children:"BrowserEvent"})," enum."]})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browsercontext",children:"BrowserContext"})}),(0,s.jsxs)(r.td,{children:[(0,s.jsxs)("p",{children:[(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browsercontext",children:"BrowserContext"})," represents individual sessions within a ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browser",children:"browser"}),"."]}),(0,s.jsxs)("p",{children:["When a ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browser",children:"browser"})," is launched, it has a single ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browsercontext",children:"browser context"})," by default. Others can be created using ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browser.createincognitobrowsercontext",children:"Browser.createIncognitoBrowserContext()"}),"."]}),(0,s.jsxs)("p",{children:[(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browsercontext",children:"BrowserContext"})," ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.eventemitter",children:"emits"})," various events which are documented in the ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.browsercontextevent",children:"BrowserContextEvent"})," enum."]}),(0,s.jsxs)("p",{children:["If a ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.page",children:"page"})," opens another ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.page",children:"page"}),", e.g. using ",(