diff --git a/lib/internal/domexception.js b/lib/internal/domexception.js index fe371e099eb17f..bd2ad958ae4c1b 100644 --- a/lib/internal/domexception.js +++ b/lib/internal/domexception.js @@ -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],