mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[55060],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return c}});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var d=a.createContext({}),i=function(e){var t=a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},u=function(e){var t=i(e.components);return a.createElement(d.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},s=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,d=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),s=i(n),c=r,k=s["".concat(d,".").concat(c)]||s[c]||m[c]||l;return n?a.createElement(k,p(p({ref:t},u),{},{components:n})):a.createElement(k,p({ref:t},u))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,p=new Array(l);p[0]=s;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o.mdxType="string"==typeof e?e:r,p[1]=o;for(var i=2;i<l;i++)p[i]=n[i];return a.createElement.apply(null,p)}return a.createElement.apply(null,n)}s.displayName="MDXCreateElement"},83896:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return o},contentTitle:function(){return d},metadata:function(){return i},toc:function(){return u},default:function(){return s}});var a=n(87462),r=n(63366),l=(n(67294),n(3905)),p=["components"],o={},d=void 0,i={unversionedId:"puppeteer.pageemittedevents",id:"version-9.1.1/puppeteer.pageemittedevents",isDocsHomePage:!1,title:"puppeteer.pageemittedevents",description:"Home > puppeteer > PageEmittedEvents",source:"@site/versioned_docs/version-9.1.1/puppeteer.pageemittedevents.md",sourceDirName:".",slug:"/puppeteer.pageemittedevents",permalink:"/puppeteer/docs/9.1.1/puppeteer.pageemittedevents",editUrl:"https://github.com/facebook/puppeteer/edit/main/website/versioned_docs/version-9.1.1/puppeteer.pageemittedevents.md",version:"9.1.1",frontMatter:{}},u=[{value:"PageEmittedEvents enum",id:"pageemittedevents-enum",children:[]},{value:"Enumeration Members",id:"enumeration-members",children:[]}],m={toc:u};function s(e){var t=e.components,n=(0,r.Z)(e,p);return(0,l.kt)("wrapper",(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"/puppeteer/docs/9.1.1/index"},"Home")," ",">"," ",(0,l.kt)("a",{parentName:"p",href:"/puppeteer/docs/9.1.1/puppeteer"},"puppeteer")," ",">"," ",(0,l.kt)("a",{parentName:"p",href:"/puppeteer/docs/9.1.1/puppeteer.pageemittedevents"},"PageEmittedEvents")),(0,l.kt)("h2",{id:"pageemittedevents-enum"},"PageEmittedEvents enum"),(0,l.kt)("p",null,"All the events that a page instance may emit."),(0,l.kt)("b",null,"Signature:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-typescript"},"export declare const enum PageEmittedEvents \n")),(0,l.kt)("h2",{id:"enumeration-members"},"Enumeration Members"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Member"),(0,l.kt)("th",{parentName:"tr",align:null},"Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Close"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"close",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when the page closes.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Console"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"console",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when JavaScript within the page calls one of console API methods, e.g. ",(0,l.kt)("code",null,"console.log")," or ",(0,l.kt)("code",null,"console.dir"),". Also emitted if the page throws an error or a warning.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Dialog"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"dialog",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a JavaScript dialog appears, such as ",(0,l.kt)("code",null,"alert"),", ",(0,l.kt)("code",null,"prompt"),", ",(0,l.kt)("code",null,"confirm")," or ",(0,l.kt)("code",null,"beforeunload"),". Puppeteer can respond to the dialog via ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.dialog.accept"},"Dialog.accept()")," or ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.dialog.dismiss"},"Dialog.dismiss()"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"DOMContentLoaded"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"domcontentloaded",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when the JavaScript ",(0,l.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded"},"DOMContentLoaded")," event is dispatched.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Error"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"error",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when the page crashes. Will contain an ",(0,l.kt)("code",null,"Error"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"FrameAttached"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"frameattached",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a frame is attached. Will contain a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.frame"},"Frame"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"FrameDetached"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"framedetached",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a frame is detached. Will contain a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.frame"},"Frame"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"FrameNavigated"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"framenavigated",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a frame is navigated to a new URL. Will contain a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.frame"},"Frame"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Load"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"load",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when the JavaScript ",(0,l.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/Events/load"},"load")," event is dispatched.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Metrics"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"metrics",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when the JavaScript code makes a call to ",(0,l.kt)("code",null,"console.timeStamp"),". For the list of metrics see ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.page.metrics"},"page.metrics"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"PageError"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"pageerror",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when an uncaught exception happens within the page. Contains an ",(0,l.kt)("code",null,"Error"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Popup"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"popup",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when the page opens a new tab or window.Contains a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.page"},"Page")," corresponding to the popup window.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Request"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"request",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a page issues a request and contains a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.httprequest"},"HTTPRequest"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"RequestFailed"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"requestfailed",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a request fails, for example by timing out.Contains a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.httprequest"},"HTTPRequest"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"RequestFinished"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"requestfinished",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a request finishes successfully. Contains a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.httprequest"},"HTTPRequest"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"RequestServedFromCache"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"requestservedfromcache",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a request ended up loading from cache. Contains a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.httprequest"},"HTTPRequest"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"Response"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"response",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a response is received. Contains a ",(0,l.kt)("a",{parentName:"td",href:"/puppeteer/docs/9.1.1/puppeteer.httpresponse"},"HTTPResponse"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"WorkerCreated"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"workercreated",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a dedicated ",(0,l.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API"},"WebWorker")," is spawned by the page.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"WorkerDestroyed"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,'"',"workerdestroyed",'"')),(0,l.kt)("td",{parentName:"tr",align:null},"Emitted when a dedicated ",(0,l.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API"},"WebWorker")," is destroyed by the page.")))))}s.isMDXComponent=!0}}]); |