mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2 lines
5.1 KiB
JavaScript
2 lines
5.1 KiB
JavaScript
|
/*! For license information please see f89bac4f.d12a44ee.js.LICENSE.txt */
|
||
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[60588],{68166:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>o});var t=n(85893),s=n(11151);const i={sidebar_label:"BrowserEvent"},a="BrowserEvent enum",c={id:"api/puppeteer.browserevent",title:"BrowserEvent enum",description:"All the events a browser instance may emit.",source:"@site/../docs/api/puppeteer.browserevent.md",sourceDirName:"api",slug:"/api/puppeteer.browserevent",permalink:"/next/api/puppeteer.browserevent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"BrowserEvent"},sidebar:"api",previous:{title:"BrowserContextOptions",permalink:"/next/api/puppeteer.browsercontextoptions"},next:{title:"BrowserEvents",permalink:"/next/api/puppeteer.browserevents"}},d={},o=[{value:"Signature:",id:"signature",level:4},{value:"Enumeration Members",id:"enumeration-members",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"browserevent-enum",children:"BrowserEvent enum"}),"\n",(0,t.jsxs)(r.p,{children:["All the events a ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.browser",children:"browser instance"})," may emit."]}),"\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 declare const enum BrowserEvent\n"})}),"\n",(0,t.jsx)(r.h2,{id:"enumeration-members",children:"Enumeration Members"}),"\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:"Member"})}),(0,t.jsx)("th",{children:(0,t.jsx)(r.p,{children:"Value"})}),(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)(r.p,{children:"Disconnected"})}),(0,t.jsx)("td",{children:(0,t.jsx)(r.p,{children:(0,t.jsx)(r.code,{children:'"disconnected"'})})}),(0,t.jsxs)("td",{children:[(0,t.jsx)(r.p,{children:"Emitted when Puppeteer gets disconnected from the browser instance. This might happen because either:"}),(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsxs)(r.li,{children:["The browser closes/crashes or - ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.browser.disconnect",children:"Browser.disconnect()"})," was called."]}),"\n"]})]})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)(r.p,{children:"TargetChanged"})}),(0,t.jsx)("td",{children:(0,t.jsx)(r.p,{children:(0,t.jsx)(r.code,{children:'"targetchanged"'})})}),(0,t.jsx)("td",{children:(0,t.jsxs)(r.p,{children:["Emitted when the URL of a target changes. Contains a ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.target",children:"Target"})," instance."]})})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)(r.p,{children:"TargetCreated"})}),(0,t.jsx)("td",{children:(0,t.jsx)(r.p,{children:(0,t.jsx)(r.code,{children:'"targetcreated"'})})}),(0,t.jsxs)("td",{children:[(0,t.jsxs)(r.p,{children:["Emitted when a target is created, for example when a new page is opened by ",(0,t.jsx)(r.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/Window/open",children:"window.open"})," or by ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.browser.newpage",children:"browser.newPage"})]}),(0,t.jsxs)(r.p,{children:["Contains a ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.target",children:"Target"})," instance."]})]})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)(r.p,{children:"TargetDestroyed"})}),(0,t.jsx)("td",{children:(0,t.jsx)(r.p,{children:(0,t.jsx)(r.code,{children:'"targetdestroyed"'})})}),(0,t.jsx)("td",{children:(0,t.jsxs)(r.p,{children:["Emitted when a target is destroyed, for example when a page is closed. Contains a ",(0,t.jsx)(r.a,{href:"/next/api/puppeteer.target",children:"Target"})," instance."]})})]})]})]})]})}function p(e={}){const{wrapper:r}={...(0,s.a)(),...e.components};return r?(0,t.jsx)(r,{...e,children
|