<titledata-rh="true">PageEvent enum | Puppeteer</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://pptr.dev/api/puppeteer.pageevent"><metadata-rh="true"property="og:locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docsearch:counter"content="2"><metadata-rh="true"property="og:title"content="PageEvent enum | Puppeteer"><metadata-rh="true"name="description"content="All the events that a page instance may emit."><metadata-rh="true"property="og:description"content="All the events that a page instance may emit."><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://pptr.dev/api/puppeteer.pageevent"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/api/puppeteer.pageevent"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/api/puppeteer.pageevent"hreflang="x-default"><linkdata-rh="true"rel="preconnect"href="https://DVKY664LG7-dsn.algolia.net"crossorigin="anonymous"><linkrel="search"type="application/opensearchdescription+xml"title="Puppeteer"href="/opensearch.xml">
<p>All the events that a page instance may emit.</p>
<h4class="anchor anchorWithStickyNavbar_LWe7"id="signature">Signature:<ahref="#signature"class="hash-link"aria-label="Direct link to Signature:"title="Direct link to Signature:"></a></h4>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="enumeration-members">Enumeration Members<ahref="#enumeration-members"class="hash-link"aria-label="Direct link to Enumeration Members"title="Direct link to Enumeration Members"></a></h2>
<table><thead><tr><th><p>Member</p></th><th><p>Value</p></th><th><p>Description</p></th></tr></thead><tbody><tr><td><p>Close</p></td><td><p><code>"close"</code></p></td><td><p>Emitted when the page closes.</p></td></tr><tr><td><p>Console</p></td><td><p><code>"console"</code></p></td><td><p>Emitted when JavaScript within the page calls one of console API methods, e.g. <code>console.log</code> or <code>console.dir</code>. Also emitted if the page throws an error or a warning.</p></td></tr><tr><td><p>Dialog</p></td><td><p><code>"dialog"</code></p></td><td><p>Emitted when a JavaScript dialog appears, such as <code>alert</code>, <code>prompt</code>, <code>confirm</code> or <code>beforeunload</code>. Puppeteer can respond to the dialog via <ahref="/api/puppeteer.dialog.accept">Dialog.accept()</a> or <ahref="/api/puppeteer.dialog.dismiss">Dialog.dismiss()</a>.</p></td></tr><tr><td><p>DOMContentLoaded</p></td><td><p><code>"domcontentloaded"</code></p></td><td><p>Emitted when the JavaScript <ahref="https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded"target="_blank"rel="noopener noreferrer">DOMContentLoaded</a> event is dispatched.</p></td></tr><tr><td><p>Error</p></td><td><p><code>"error"</code></p></td><td><p>Emitted when the page crashes. Will contain an <code>Error</code>.</p></td></tr><tr><td><p>FrameAttached</p></td><td><p><code>"frameattached"</code></p></td><td><p>Emitted when a frame is attached. Will contain a <ahref="/api/puppeteer.frame">Frame</a>.</p></td></tr><tr><td><p>FrameDetached</p></td><td><p><code>"framedetached"</code></p></td><td><p>Emitted when a frame is detached. Will contain a <ahref="/api/puppeteer.frame">Frame</a>.</p></td></tr><tr><td><p>FrameNavigated</p></td><td><p><code>"framenavigated"</code></p></td><td><p>Emitted when a frame is navigated to a new URL. Will contain a <ahref="/api/puppeteer.frame">Frame</a>.</p></td></tr><tr><td><p>Load</p></td><td><p><code>"load"</code></p></td><td><p>Emitted when the JavaScript <ahref="https://developer.mozilla.org/en-US/docs/Web/Events/load"target="_blank"rel="noopener noreferrer">load</a> event is dispatched.</p></td></tr><tr><td><p>Metrics</p></td><td><p><code>"metrics"</code></p></td><td><p>Emitted when the JavaScript code makes a call to <code>console.timeStamp</code>. For the list of metrics see <ahref="/api/puppeteer.page.metrics">page.metrics</a>.</p></td></tr><tr><td><p>PageError</p></td><td><p><code>"pageerror"</code></p></td><td><p>Emitted when an uncaught exception happens within the page. Contains an <code>Error</code>.</p></td></tr><tr><td><p>Popup</p></td><td><p><code>"popup"</code></p></td><td><p>Emitted when the page opens a new tab or window.</p><p>Contains a <ahref="/api/puppeteer.page">Page</a> corresponding to the popup window.</p></td></tr><tr><td><p>Request</p></td><td><p><code>"request"</code></p></td><td><p>Emitted when a page issues a request and contains a <ahref="/api/puppeteer.httprequest">HTTPRequest</a>.</p></td></tr><tr><td><p>RequestFailed</p></td><td><p><code>"requestfailed"</code></p></td><td><p>Emitted when a request fails, for example by timing out.</p><p>Contains a <ahref="/api/puppeteer.httprequest">HTTPRequest</a>.</p></td></tr><tr><td><p>RequestFinished</p></td><td><p><code>"requestfinished"</code></p></td><td><p>Emitted when a request finishes successfully. Contains a <ahref="/api/puppeteer.httprequest">HTTPRequest</a>.</p></td></tr><tr><td><p>RequestServedFromCache</p></td><td><p><code>"requestservedfromcache"</code></p></td><td><p>Emitted when a request ended up loading from cache. Contains a <ahref="/api/puppeteer.httprequest">HTTPRequest</a>.</p></td></tr><tr><td><p>Response</p></td><td><p><code>"response"</code></p></td><td><p>Emitted when a response is received. Contains a <ahref="/api/puppeteer.httpresponse">HTTPResponse</a>.</p></td></tr><tr><td><p>WorkerCreated</p></td><td><p><code>"workercreated"</