Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib: set Symbol.toStringTag of DOMException
  • Loading branch information
joyeecheung committed Sep 18, 2018
commit 6ec4332de1114dafcb2db7ad6f5638b2c994cd90
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