<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/next/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="3"><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/next/api/puppeteer.pageevent"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/next/api/puppeteer.pageevent"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/next/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>Member</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td>Close</td><td><code>"close"</code></td><td>Emitted when the page closes.</td></tr><tr><td>Console</td><td><code>"console"</code></td><td>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.</td></tr><tr><td>Dialog</td><td><code>"dialog"</code></td><td>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="/next/api/puppeteer.dialog.accept">Dialog.accept()</a> or <ahref="/next/api/puppeteer.dialog.dismiss">Dialog.dismiss()</a>.</td></tr><tr><td>DOMContentLoaded</td><td><code>"domcontentloaded"</code></td><td>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.</td></tr><tr><td>Error</td><td><code>"error"</code></td><td>Emitted when the page crashes. Will contain an <code>Error</code>.</td></tr><tr><td>FrameAttached</td><td><code>"frameattached"</code></td><td>Emitted when a frame is attached. Will contain a <ahref="/next/api/puppeteer.frame">Frame</a>.</td></tr><tr><td>FrameDetached</td><td><code>"framedetached"</code></td><td>Emitted when a frame is detached. Will contain a <ahref="/next/api/puppeteer.frame">Frame</a>.</td></tr><tr><td>FrameNavigated</td><td><code>"framenavigated"</code></td><td>Emitted when a frame is navigated to a new URL. Will contain a <ahref="/next/api/puppeteer.frame">Frame</a>.</td></tr><tr><td>Load</td><td><code>"load"</code></td><td>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.</td></tr><tr><td>Metrics</td><td><code>"metrics"</code></td><td>Emitted when the JavaScript code makes a call to <code>console.timeStamp</code>. For the list of metrics see <ahref="/next/api/puppeteer.page.metrics">page.metrics</a>.</td></tr><tr><td>PageError</td><td><code>"pageerror"</code></td><td>Emitted when an uncaught exception happens within the page. Contains an <code>Error</code>.</td></tr><tr><td>Popup</td><td><code>"popup"</code></td><td><p>Emitted when the page opens a new tab or window.</p><p>Contains a <ahref="/next/api/puppeteer.page">Page</a> corresponding to the popup window.</p></td></tr><tr><td>Request</td><td><code>"request"</code></td><td>Emitted when a page issues a request and contains a <ahref="/next/api/puppeteer.httprequest">HTTPRequest</a>.</td></tr><tr><td>RequestFailed</td><td><code>"requestfailed"</code></td><td><p>Emitted when a request fails, for example by timing out.</p><p>Contains a <ahref="/next/api/puppeteer.httprequest">HTTPRequest</a>.</p></td></tr><tr><td>RequestFinished</td><td><code>"requestfinished"</code></td><td>Emitted when a request finishes successfully. Contains a <ahref="/next/api/puppeteer.httprequest">HTTPRequest</a>.</td></tr><tr><td>RequestServedFromCache</td><td><code>"requestservedfromcache"</code></td><td>Emitted when a request ended up loading from cache. Contains a <ahref="/next/api/puppeteer.httprequest">HTTPRequest</a>.</td></tr><tr><td>Response</td><td><code>"response"</code></td><td>Emitted when a response is received. Contains a <ahref="/next/api/puppeteer.httpresponse">HTTPResponse</a>.</td></tr><tr><td>WorkerCreated</td><td><code>"workercreated"</code></td><td>Emitted when a dedicated <ahref="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API"target="_blank"rel="noopener noreferrer">WebWorker</a> is spawned by the page.</td></tr><tr><td>WorkerDestroyed</td><td><code>"workerdestroyed"</code></td><td>Emitted when a dedicated <ahr