diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/console/trace | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/ja/web/api/console/trace')
-rw-r--r-- | files/ja/web/api/console/trace/index.html | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/files/ja/web/api/console/trace/index.html b/files/ja/web/api/console/trace/index.html new file mode 100644 index 0000000000..db2ebb2ec6 --- /dev/null +++ b/files/ja/web/api/console/trace/index.html @@ -0,0 +1,86 @@ +--- +title: Console.trace() +slug: Web/API/console/trace +tags: + - API + - Chrome + - DOM + - Debugging + - Firefox + - Method + - NeedsBrowserCompatibility + - String + - Web Development + - console + - console.trace() + - trace + - web console +translation_of: Web/API/Console/trace +--- +<div>{{APIRef("Console API")}}</div> + +<p>{{domxref("console")}} インタフェースの <code><strong>trace()</strong></code> メソッドは、<a href="/ja/docs/Tools/Web_Console">Web コンソール</a>にスタックトレースを出力します。</p> + +<p>{{AvailableInWorkers}}</p> + +<p>詳細や使用例については、{{domxref("console")}} のドキュメントの <a href="/ja/docs/Web/API/console#Stack_traces">スタックトレース</a> をご覧ください。</p> + +<h2 id="構文">構文</h2> + +<pre class="syntaxbox">console.trace( [...<var>any</var>, ...<var>data</var> ]);</pre> + +<h3 id="引数">引数</h3> + +<dl> + <dt><code>...<var>any</var>, ...<var>data</var></code> {{optional_inline}}</dt> + <dd>コンソールにスタックトレースとともに出力されるゼロ個以上のオブジェクト。これらは、{{domxref("console.log()")}}<span class="tlid-translation translation" lang="ja"><span title="">メソッドに渡される場合と同じ方法でアセンブルおよびフォーマットされます。</span></span></dd> +</dl> + +<h2 id="例">例</h2> + +<pre class="brush: js">function foo() { + function bar() { + console.trace(); + } + bar(); +} + +foo(); +</pre> + +<p>コンソールには次のようなトレースが表示されます。</p> + +<pre>bar +foo +<anonymous></pre> + +<h2 id="仕様">仕様</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">仕様書</th> + <th scope="col">策定状況</th> + <th scope="col">コメント</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("Console API", "#trace", "console.trace()")}}</td> + <td>{{Spec2("Console API")}}</td> + <td>最初の定義</td> + </tr> + </tbody> +</table> + +<h2 id="ブラウザ実装状況">ブラウザ実装状況</h2> + + + +<p>{{Compat("api.Console.trace")}}</p> + +<h2 id="関連情報">関連情報</h2> + +<ul> + <li><a class="external" href="http://www.opera.com/dragonfly/documentation/console/">Opera Dragonfly documentation: Console</a></li> +</ul> |