非標準
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Web コンソールに新たなインライングループを作成します。ただし console.group() とは異なり、新しいグループは折りたたまれた状態で作成されます。グループ内に作成された項目を表示するには、グループの隣にある展開ボタンを使用して、ユーザが展開しなければなりません。
親グループに戻るには、console.groupEnd() を呼び出します。
詳細および使用例は console のドキュメントで、コンソールでグループを使用する をご覧ください。
註: This feature is available in Web Workers.
構文
console.groupCollapsed();
引数
なし。
仕様
| 仕様書 | 策定状況 | コメント |
|---|---|---|
| Console API console.groupCollapsed() の定義 |
勧告改訂案 | 最初期の定義 |
ブラウザ実装状況
| 機能 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| 基本サポート | 6 | 9.0 (9.0)[1] | 11 | ? | 5.1[2] |
| Worker で使用可能 | ? | 38.0 (38.0) | ? | ? | ? |
| 機能 | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| 基本サポート | ? | 9.0 (9.0)[1] | ? | ? | ? |
| Worker で使用可能 | ? | 38.0 (38.0) | ? | ? | ? |
[1] Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6) よりこのメソッドをサポートしていますが、新しいグループは折りたたまれていません。このメソッドの機能は console.group() と同じです。
[2] https://trac.webkit.org/changeset/60234 で実装。