console.groupCollapsed()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

console.groupCollapsed() メソッドは、ウェブコンソールに新たなインライングループを作成します。 console.group() とは異なり、新しいグループは折りたたまれた状態で作成されます。グループ内に作成された項目を表示するには、グループの隣にある展開ボタンを使用する必要があります。

親グループに戻るには、console.groupEnd() を呼び出します。

詳細および使用例は console のドキュメントで、コンソールでのグループの使用 をご覧ください。

メモ: この機能はウェブワーカー内で利用可能です。

構文

js
groupCollapsed();
groupCollapsed(label);

引数

label

グループのラベルです。省略可能です。

返値

なし (undefined)。

仕様書

Specification
Console
# groupcollapsed

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
groupCollapsed() static method

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.