Skip to content

Commit 6ec4332

Browse files
committed
lib: set Symbol.toStringTag of DOMException
1 parent bb9d788 commit 6ec4332

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/internal/domexception.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ class DOMException extends Error {
4343
}
4444
}
4545

46+
Object.defineProperties(DOMException.prototype, {
47+
[Symbol.toStringTag]: { configurable: true, value: 'DOMException' }
48+
});
49+
4650
for (const [name, codeName, value] of [
4751
['IndexSizeError', 'INDEX_SIZE_ERR', 1],
4852
['DOMStringSizeError', 'DOMSTRING_SIZE_ERR', 2],

0 commit comments

Comments
 (0)