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 05e08bd

Browse filesBrowse files
Lekodanielleadams
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 166f14a commit 05e08bd
Copy full SHA for 05e08bd

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
@@ -19,6 +19,7 @@ const {
1919
ReflectOwnKeys,
2020
Symbol,
2121
SymbolHasInstance,
22+
SymbolToStringTag,
2223
WeakMap,
2324
} = primordials;
2425

@@ -233,6 +234,12 @@ ObjectDefineProperties(Console.prototype, {
233234
...consolePropAttributes,
234235
value: groupIndentation
235236
},
237+
[SymbolToStringTag]: {
238+
writable: false,
239+
enumerable: false,
240+
configurable: true,
241+
value: 'console'
242+
}
236243
});
237244
}
238245
},
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.