browser-compat-data icon indicating copy to clipboard operation
browser-compat-data copied to clipboard

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

Open eritbh opened this issue 1 year ago • 0 comments

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

eritbh avatar Oct 10 '24 16:10 eritbh