mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
console: use consolePropAttributes for k-bind properties in constructor
PR-URL: https://github.com/nodejs/node/pull/26850 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
committed by
Daniel Bevenius
parent
6342af7ebd
commit
ed5e69d7e6
@@ -181,15 +181,13 @@ Console.prototype[kBindProperties] = function(ignoreErrors, colorMode) {
|
||||
...consolePropAttributes,
|
||||
value: Boolean(ignoreErrors)
|
||||
},
|
||||
'_times': { ...consolePropAttributes, value: new Map() }
|
||||
'_times': { ...consolePropAttributes, value: new Map() },
|
||||
// Corresponds to https://console.spec.whatwg.org/#count-map
|
||||
[kCounts]: { ...consolePropAttributes, value: new Map() },
|
||||
[kColorMode]: { ...consolePropAttributes, value: colorMode },
|
||||
[kIsConsole]: { ...consolePropAttributes, value: true },
|
||||
[kGroupIndent]: { ...consolePropAttributes, value: '' }
|
||||
});
|
||||
|
||||
// TODO(joyeecheung): use consolePropAttributes for these
|
||||
// Corresponds to https://console.spec.whatwg.org/#count-map
|
||||
this[kCounts] = new Map();
|
||||
this[kColorMode] = colorMode;
|
||||
this[kIsConsole] = true;
|
||||
this[kGroupIndent] = '';
|
||||
};
|
||||
|
||||
// Make a function that can serve as the callback passed to `stream.write()`.
|
||||
|
||||
Reference in New Issue
Block a user