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 337096ba.60f3ffec.js.LICENSE.txt */
|
||
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[50879],{85517:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>t,metadata:()=>c,toc:()=>h});var s=n(85893),d=n(11151);const t={sidebar_label:"PageEvent"},i="PageEvent enum",c={id:"api/puppeteer.pageevent",title:"PageEvent enum",description:"All the events that a page instance may emit.",source:"@site/../docs/api/puppeteer.pageevent.md",sourceDirName:"api",slug:"/api/puppeteer.pageevent",permalink:"/next/api/puppeteer.pageevent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"PageEvent"},sidebar:"api",previous:{title:"Offset",permalink:"/next/api/puppeteer.offset"},next:{title:"PageEvents",permalink:"/next/api/puppeteer.pageevents"}},l={},h=[{value:"Signature:",id:"signature",level:4},{value:"Enumeration Members",id:"enumeration-members",level:2}];function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,d.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h1,{id:"pageevent-enum",children:"PageEvent enum"}),"\n",(0,s.jsx)(r.p,{children:"All the events that a page instance may emit."}),"\n",(0,s.jsx)(r.h4,{id:"signature",children:"Signature:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-typescript",children:"export declare const enum PageEvent\n"})}),"\n",(0,s.jsx)(r.h2,{id:"enumeration-members",children:"Enumeration Members"}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:(0,s.jsx)(r.p,{children:"Member"})}),(0,s.jsx)("th",{children:(0,s.jsx)(r.p,{children:"Value"})}),(0,s.jsx)("th",{children:(0,s.jsx)(r.p,{children:"Description"})})]})}),(0,s.jsxs)("tbody",{children:[(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:"Close"})}),(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:'"close"'})})}),(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:"Emitted when the page closes."})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:"Console"})}),(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:'"console"'})})}),(0,s.jsx)("td",{children:(0,s.jsxs)(r.p,{children:["Emitted when JavaScript within the page calls one of console API methods, e.g. ",(0,s.jsx)(r.code,{children:"console.log"})," or ",(0,s.jsx)(r.code,{children:"console.dir"}),". Also emitted if the page throws an error or a warning."]})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:"Dialog"})}),(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:'"dialog"'})})}),(0,s.jsx)("td",{children:(0,s.jsxs)(r.p,{children:["Emitted when a JavaScript dialog appears, such as ",(0,s.jsx)(r.code,{children:"alert"}),", ",(0,s.jsx)(r.code,{children:"prompt"}),", ",(0,s.jsx)(r.code,{children:"confirm"})," or ",(0,s.jsx)(r.code,{children:"beforeunload"}),". Puppeteer can respond to the dialog via ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.dialog.accept",children:"Dialog.accept()"})," or ",(0,s.jsx)(r.a,{href:"/next/api/puppeteer.dialog.dismiss",children:"Dialog.dismiss()"}),"."]})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:"DOMContentLoaded"})}),(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:'"domcontentloaded"'})})}),(0,s.jsx)("td",{children:(0,s.jsxs)(r.p,{children:["Emitted when the JavaScript ",(0,s.jsx)(r.a,{href:"https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded",children:"DOMContentLoaded"})," event is dispatched."]})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:"Error"})}),(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:'"error"'})})}),(0,s.jsx)("td",{children:(0,s.jsxs)(r.p,{children:["Emitted when the page crashes. Will contain an ",(0,s.jsx)(r.code,{children:"Error"}),"."]})})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)(r.p,{children:"FrameAttached"})}),(0,s.jsx)("t
|