Open saschanaz opened 1 year ago
I like using error.cause
. The main issue here though is cross-realm serialization. I guess that mostly works for errors these days, although I wish someone (not me) had the time to make it work with the new error types and capabilities. I tried in https://github.com/whatwg/html/pull/5749 but got stalled. (I guess Firefox implemented something without a spec.)
Seems reasonable, might require some Web IDL changes to be able to set this property?
Alright, in that case this depends on https://github.com/whatwg/webidl/pull/1179.
Different browsers do different things:
[object Object]
by stringification)Should the spec define a way to do this? Maybe use the new
error.cause
?