Skip to content

Commit

Permalink
lib: set Symbol.toStringTag of DOMException
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed Sep 18, 2018
1 parent bb9d788 commit 6ec4332
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 6ec4332

Please sign in to comment.