demo · v137

Endpoint Inbox

v137 augments the existing crash report type. Configure your endpoint with the Reporting-Endpoints header and the browser posts { type: "crash", body: { reason, stack } } JSON when a tab freezes. This page wires up ReportingObserver as the in-page mirror, freezes the main thread, and renders what the off-process delivery would carry.

probing…

server config

This is what your server has to emit. The endpoints param maps named groups to URLs the browser POSTs to.

Reporting-Endpoints: default="/_report", crashes="/_crash" Content-Security-Policy: report-to default # Browser then delivers, every ~minute or on offload: POST /_crash HTTP/1.1 Content-Type: application/reports+json [{"type":"crash","age":1234,"url":"...","user_agent":"...", "body":{"reason":"unresponsive","stack":[ ... ]}}]

ReportingObserver (in-page mirror)

0 reports

awaiting…

simulated endpoint inbox (from LoAF stack)

0 deliveries

awaiting…

the code

// 1. Server opt-in (sent once per response):
Reporting-Endpoints: crashes="https://example.com/_crash"

// 2. Page-side mirror so you can debug without a server:
new ReportingObserver((reports) => {
  for (const r of reports) {
    if (r.type === "crash") console.log(r.body); // body.reason + body.stack
  }
}, { types: ["crash"], buffered: true }).observe();

// 3. v137 addition: body.stack is populated when reason === "unresponsive".
//    Same call-stack shape the browser delivers off-page to your endpoint.

see also