blob: 16ed75efdcf007b623d6d25430d0db72dfa055ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
---
title: performance.toJSON()
slug: Web/API/Performance/toJSON
tags:
- API
- パフォーマンス
- メソッド
- リファレンス
translation_of: Web/API/Performance/toJSON
---
<div>{{APIRef("High Resolution Timing")}}</div>
<p>{{domxref("Performance")}} インターフェイスの <strong><code>toJSON()</code></strong> メソッドは標準のシリアライザです。パフォーマンスオブジェクトのプロパティの JSON 表現を返します。</p>
<p>{{availableinworkers}}</p>
<h2 id="構文">構文</h2>
<pre class="syntaxbox">myPerf = performance.toJSON()
</pre>
<h3 id="引数">引数</h3>
<dl>
<dt>なし</dt>
<dd> </dd>
</dl>
<h3 id="戻り値">戻り値</h3>
<dl>
<dt>myPerf</dt>
<dd>{{domxref("Performance")}} オブジェクトのシリアル化である JSON オブジェクト</dd>
</dl>
<h2 id="例">例</h2>
<pre class="brush: js">var js;
js = window.performance.toJSON();
console.log("json = " + JSON.stringify(js));
</pre>
<h2 id="仕様">仕様</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">仕様書</th>
<th scope="col">ステータス</th>
<th scope="col">コメント</th>
</tr>
<tr>
<td>{{SpecName('Highres Time Level 2', '#dom-performance-tojson', 'toJSON() serializer')}}</td>
<td>{{Spec2('Highres Time Level 2')}}</td>
<td><code>toJson()</code>を定義します。</td>
</tr>
</tbody>
</table>
<h2 id="ブラウザの互換性">ブラウザの互換性</h2>
<div>
<p>{{Compat("api.Performance.toJSON")}}</p>
</div>
|