diff options
author | Leko <leko.noor@gmail.com> | 2020-09-28 19:00:38 +0300 |
---|---|---|
committer | Leko <leko.noor@gmail.com> | 2020-10-01 18:52:08 +0300 |
commit | 4a6005c56acc35981277b1cb017056083c73c311 (patch) | |
tree | 52ece90bc4861296ad17929886966e63694fabaf /lib/internal/console | |
parent | 91837e9fbbd27fce37719b2decaf3a3196a31171 (diff) |
console: add Symbol.toStringTag property
Add Symbol.toStringTag property to console object to follow WPT changes
Update WPT status of console and the repl test case
Refs: https://github.com/web-platform-tests/wpt/pull/24717
PR-URL: https://github.com/nodejs/node/pull/35399
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/console')
-rw-r--r-- | lib/internal/console/constructor.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index dfad0811b25..aae511cb6c7 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -19,6 +19,7 @@ const { ReflectOwnKeys, Symbol, SymbolHasInstance, + SymbolToStringTag, WeakMap, } = primordials; @@ -233,6 +234,12 @@ ObjectDefineProperties(Console.prototype, { ...consolePropAttributes, value: groupIndentation }, + [SymbolToStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: 'console' + } }); } }, |