DOMExceptions are defined in WebIDL, including this sentence:
Additionally, if an implementation gives native Error objects special powers or nonstandard properties (such as a stack property), it should also expose those on DOMException objects.
Presumably this would need to be reworded. Engines are not currently consistent about this; in Chrome it apparently depends on how it's thrown.
Also, structured clone handwaves cloning the .stack as follows:
User agents should attach a serialized representation of any interesting accompanying data which are not yet specified, notably the stack property, to serialized.
This too would presumably need to be reworded.
Also there would need to be WPT tests for presence of .stack as a string on DOMExceptions, both manually created and thrown, as well as for cloning of stacks with structured clone.
DOMExceptions are defined in WebIDL, including this sentence:
Presumably this would need to be reworded. Engines are not currently consistent about this; in Chrome it apparently depends on how it's thrown.
Also, structured clone handwaves cloning the
.stackas follows:This too would presumably need to be reworded.
Also there would need to be WPT tests for presence of
.stackas a string on DOMExceptions, both manually created and thrown, as well as for cloning of stacks with structured clone.