mdn / browser-compat-data

This repository contains compatibility data for Web technologies as displayed on MDN
https://developer.mozilla.org
Creative Commons Zero v1.0 Universal
4.95k stars 1.98k forks source link

javascript.builtins.Error.cause - Cause is displayed in console in Chrome #24689

Open eritbh opened 1 week ago

eritbh commented 1 week ago

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

"Cause is displayed in console" - Chrome and other Chromium-based browsers are listed as not supporting this feature, with a link to https://crbug.com/1211260 - however that bug is listed as fixed, and the cause is in fact displayed in the console in modern versions of Chromium.

What browsers does this problem apply to, if applicable?

Chromium (Chrome, Edge 79+, Opera, Samsung Internet)

What did you expect to see?

This feature should be marked as supported in Chrome and other Chromium-based browsers.

Did you test this? If so, how?

In the relevant browser, open the console on any page and inspect an Error constructed with a cause, e.g.:

new Error('foo', {cause: new Error('bar')})
//> Error: foo
//>     at <anonymous>:1:1
//> Caused by: Error: bar
//>     at <anonymous>:1:26

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

This feature doesn't appear to be listed in any release notes I could find. The relevant bug is listed on the 98 milestone; however it was only marked as fixed in 2024 so that seems wrong. I'm unsure when exactly this became available.

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause

MDN metadata

MDN page report details * Query: `javascript.builtins.Error.cause` * Report started: 2024-10-10T16:10:03.116Z
dharesign commented 1 day ago

It was added in 125: https://developer.chrome.com/blog/new-in-devtools-125#error-cause