Skip to content

Commit

Permalink
lib: set Symbol.toStringTag of DOMException
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
joyeecheung authored and targos committed Sep 21, 2018
1 parent cc82194 commit 5e7b108
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/internal/domexception.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class DOMException extends Error {
}
}

Object.defineProperties(DOMException.prototype, {
[Symbol.toStringTag]: { configurable: true, value: 'DOMException' }
});

for (const [name, codeName, value] of [
['IndexSizeError', 'INDEX_SIZE_ERR', 1],
['DOMStringSizeError', 'DOMSTRING_SIZE_ERR', 2],
Expand Down

0 comments on commit 5e7b108

Please sign in to comment.