Creates a new inline group in the Web Console. Unlike console.group()
, however, the new group is created collapsed. The user will need to use the disclosure button next to it to expand it, revealing the entries created in the group.
Call console.groupEnd()
to back out to the parent group.
See Using groups in the console in the console
documentation for details and examples.
Note: This feature is available in Web Workers.
Syntax
console.groupCollapsed([label]);
Parameters
label
- Label for the group. Optional.
Specifications
Specification | Status | Comment |
---|---|---|
Console API The definition of 'console.groupCollapsed()' in that specification. |
Living Standard | Initial definition |
Browser compatibility
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 6 | (Yes) | 9.0 (9.0)[1] | 11 | ? | 5.1[2] |
Available in workers | ? | ? | 38.0 (38.0) | ? | ? | ? |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Yes) | 9.0 (9.0)[1] | ? | ? | ? |
Available in workers | ? | ? | 38.0 (38.0) | ? | ? | ? |
[1] This method is supported starting in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), but the new group was not collapsed; it's functionally was equivalent to console.group()
. Since Gecko 52.0 (Firefox 52.0 / Thunderbird 52.0 / SeaMonkey 2.49) the group is collapsed. See bug 1088360.
[2] Implemented in http://trac.webkit.org/changeset/60234.
See also
Document Tags and Contributors
Tags:
Contributors to this page:
bkdotcom,
valtlai,
erikadoyle,
Sebastianz,
chrisdavidmills,
cvrebert,
teoli,
ESWAT,
kscarfone,
Sheppy,
ziyunfei,
myakura
Last updated by:
bkdotcom,