whatwg / console

Console Standard
https://console.spec.whatwg.org/
Other
274 stars 70 forks source link

Deprecate groupCollapsed in favor of group and groupEnd #229

Open adderek opened 1 year ago

adderek commented 1 year ago

What is the issue with the Console Standard?

In my opinion .groupCollapsed is meaningless because usually you don't know in advance whether the group should be collapsed or not.

What I propose instead:

/**
 * @function groupEnd
 * @memberof console
 * @param {string|undefined} [label] Defaults to current group.
 * @param {boolean} [unfold] If true then group should remain unfolded. Default is false.
 */

Though I would prefer to leave this entirely to the Output to decide whether it should be folded or not (preferably fold everything unless there is an error or group is still not ended)