Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e766a6

Browse filesBrowse files
LekoMylesBorins
authored andcommitted
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: web-platform-tests/wpt#24717 PR-URL: #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>
1 parent ae14923 commit 2e766a6
Copy full SHA for 2e766a6

File tree

Expand file treeCollapse file tree

2 files changed

+8
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/console/constructor.js‎

Copy file name to clipboardExpand all lines: lib/internal/console/constructor.js
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const {
1717
ReflectOwnKeys,
1818
Symbol,
1919
SymbolHasInstance,
20+
SymbolToStringTag,
2021
WeakMap,
2122
} = primordials;
2223

@@ -228,6 +229,12 @@ ObjectDefineProperties(Console.prototype, {
228229
...consolePropAttributes,
229230
value: groupIndentation
230231
},
232+
[SymbolToStringTag]: {
233+
writable: false,
234+
enumerable: false,
235+
configurable: true,
236+
value: 'console'
237+
}
231238
});
232239
}
233240
},
Collapse file

‎test/parallel/test-repl.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ const errorTests = [
757757
{
758758
send: 'console',
759759
expect: [
760-
'{',
760+
'Object [console] {',
761761
' log: [Function: log],',
762762
' warn: [Function: warn],',
763763
' dir: [Function: dir],',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.