Skip to content

Commit 5e7b108

Browse files
joyeecheungtargos
authored andcommitted
lib: set Symbol.toStringTag of DOMException
PR-URL: #22933 Refs: #22550 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent cc82194 commit 5e7b108

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/internal/domexception.js

+4
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)