puppeteer/assets/js/5ec3f68e.b394f274.js

2 lines
71 KiB
JavaScript
Raw Normal View History

/*! For license information please see 5ec3f68e.b394f274.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[30776],{46834:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var t=s(85893),n=s(11151);const i={sidebar_label:"API"},d="API Reference",c={id:"api/index",title:"API Reference",description:"Classes",source:"@site/versioned_docs/version-22.8.2/api/index.md",sourceDirName:"api",slug:"/api/",permalink:"/api/",draft:!1,unlisted:!1,tags:[],version:"22.8.2",frontMatter:{sidebar_label:"API"}},a={},p=[{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 l(e){const r={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"api-reference",children:"API Reference"}),"\n",(0,t.jsx)(r.h2,{id:"classes",children:"Classes"}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:(0,t.jsx)(r.p,{children:"Class"})}),(0,t.jsx)("th",{children:(0,t.jsx)(r.p,{children:"Description"})})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)("span",{id:"accessibility",children:(0,t.jsx)(r.a,{href:"/api/puppeteer.accessibility",children:"Accessibility"})})}),(0,t.jsxs)("td",{children:[(0,t.jsxs)(r.p,{children:["The Accessibility class provides methods for inspecting the browser's accessibility tree. The accessibility tree is used by assistive technology such as ",(0,t.jsx)(r.a,{href:"https://en.wikipedia.org/wiki/Screen_reader",children:"screen readers"})," or ",(0,t.jsx)(r.a,{href:"https://en.wikipedia.org/wiki/Switch_access",children:"switches"}),"."]}),(0,t.jsx)(r.p,{children:(0,t.jsx)(r.strong,{children:"Remarks:"})}),(0,t.jsx)(r.p,{children:"Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output."}),(0,t.jsx)(r.p,{children:'Blink - Chrome\'s rendering engine - has a concept of "accessibility tree", which is then translated into different platform-specific APIs. Accessibility namespace gives users access to the Blink Accessibility Tree.'}),(0,t.jsx)(r.p,{children:'Most of the accessibility tree gets filtered out when converting from Blink AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. By default, Puppeteer tries to approximate this filtering, exposing only the "interesting" nodes of the tree.'}),(0,t.jsxs)(r.p,{children:["The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ",(0,t.jsx)(r.code,{children:"Accessibility"})," class."]})]})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)("span",{id:"browser",children:(0,t.jsx)(r.a,{href:"/api/puppeteer.browser",children:"Browser"})})}),(0,t.jsxs)("td",{children:[(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.a,{href:"/api/puppeteer.browser",children:"Browser"})," represents a browser instance that is either:"]}),(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsxs)(r.li,{children:["connected to via ",(0,t.jsx)(r.a,{href:"/api/puppeteer.puppeteer.connect",children:"Puppeteer.connect()"})," or - launched by ",(0,t.jsx)(r.a,{href:"/api/puppeteer.puppeteernode.launch",children:"PuppeteerNode.launch()"}),"."]}),"\n"]}),(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.a,{href:"/api/puppeteer.browser",children:"Browser"})," ",(0,t.jsx)(r.a,{href:"/api/puppeteer.eventemitter.emit",children:"emits"})," various events which are documented in the ",(0,t.jsx)(r.a,{href:"/api/puppeteer.browserevent",children:"BrowserEvent"})," enum."]}),(0,t.jsx)(r.p,{children:(0,t.jsx)(r.strong,{children:"Remarks:"})}),(0,t.jsxs)(r.p,{children:["The constructor for this cla