confluence icon indicating copy to clipboard operation
confluence copied to clipboard

.stack on Errors is claimed to be a Firefox-only API, when it's not

Open bzbarsky opened this issue 8 years ago • 4 comments

It's in all browsers, and required for web compat. It's just that some browsers make it an instance property, not a prototype property.

bzbarsky avatar Nov 07 '17 14:11 bzbarsky

Yep, looks like Firefox has Error.prototype.stack but nobody else. I don't see stack in https://tc39.github.io/ecma262/#sec-properties-of-the-error-prototype-object, is this not defined by any spec?

@mdittmer, do we have an umbrella bug for these instance vs. prototype issues?

foolip avatar Jan 11 '18 12:01 foolip

is this not defined by any spec?

Correct. It's just needed for web compat. ;)

bzbarsky avatar Jan 11 '18 13:01 bzbarsky

We do not have an umbrella bug for instance vs. prototype issues, but we do interpret accessible instances. I think this needs a factory to produce an instance for inspection.

On Thu, Jan 11, 2018 at 8:33 AM, Boris Zbarsky [email protected] wrote:

is this not defined by any spec?

Correct. It's just needed for web compat. ;)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GoogleChromeLabs/confluence/issues/237#issuecomment-356935149, or mute the thread https://github.com/notifications/unsubscribe-auth/ABsWSAQtSsXzM3Ro4TnrNbIBnhGrETQ-ks5tJg3GgaJpZM4QU3Yi .

mdittmer avatar Jan 11 '18 14:01 mdittmer

new Error works fine.

bzbarsky avatar Jan 11 '18 17:01 bzbarsky