From 6d7541703a194e85ad26932811abf9e69c981426 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 22 Feb 2022 01:23:02 +0900 Subject: 2021/09/15 時点の英語版に同期 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2021/09/15 時点の英語版に同期 2021/09/15 時点の英語版に同期 --- files/ja/web/api/performance/clearmarks/index.md | 80 ++++++++------------ .../ja/web/api/performance/clearmeasures/index.md | 79 ++++++++------------ .../api/performance/clearresourcetimings/index.md | 62 ++++++---------- files/ja/web/api/performance/getentries/index.md | 75 +++++++------------ .../web/api/performance/getentriesbyname/index.md | 86 +++++++++------------- .../web/api/performance/getentriesbytype/index.md | 83 ++++++++------------- .../setresourcetimingbuffersize/index.md | 64 ++++++---------- files/ja/web/api/performance/tojson/index.md | 62 ++++++---------- 8 files changed, 221 insertions(+), 370 deletions(-) (limited to 'files/ja') diff --git a/files/ja/web/api/performance/clearmarks/index.md b/files/ja/web/api/performance/clearmarks/index.md index 7cc3b260b5..3af662b823 100644 --- a/files/ja/web/api/performance/clearmarks/index.md +++ b/files/ja/web/api/performance/clearmarks/index.md @@ -3,41 +3,41 @@ title: performance.clearMarks() slug: Web/API/Performance/clearMarks tags: - API - - Web パフォーマンス - メソッド + - リファレンス + - ウェブパフォーマンス +browser-compat: api.Performance.clearMarks translation_of: Web/API/Performance/clearMarks --- -
{{APIRef("User Timing API")}}
+{{APIRef("User Timing API")}} -

clearMarks() メソッドは、ブラウザのパフォーマンスエントリバッファから名前付きマークを削除します。
- このメソッドが引数なしで呼び出された場合、{{domxref("PerformanceEntry.entryType","エントリタイプ")}} が "mark" の{{domxref("PerformanceEntry","パフォーマンスエントリ")}}はすべてパフォーマンスエントリバッファから削除されます。

+**`clearMarks()`** メソッドは、ブラウザーのパフォーマンスエントリーバッファーから*名前付きマーク*を削除します。このメソッドが引数なしで呼び出された場合、{{domxref("PerformanceEntry.entryType","エントリー種別", "", 1)}}が "`mark`" の{{domxref("PerformanceEntry","パフォーマンスエントリー", "", 1)}}がすべてパフォーマンスエントリーバッファーから削除されます。 -

{{AvailableInWorkers}}

+{{AvailableInWorkers}} -

構文

+## 構文 -
performance.clearMarks();
-performance.clearMarks(name);
-
+```js +performance.clearMarks(); +performance.clearMarks(name); +``` -

引数

+### 引数 -
-
name {{optional_inline}}
-
タイムスタンプの名前を表す{{domxref("DOMString")}}。 この引数を省略すると、 {{domxref("PerformanceEntry.entryType","entry type")}} が "mark" であるすべての {{domxref("PerformanceEntry","performance entries")}} が削除されます。
-
+- name {{optional_inline}} + - : タイムスタンプの名前を表す {{domxref("DOMString")}} です。 この引数を省略すると、{{domxref("PerformanceEntry.entryType","エントリー種別", "", 1)}}が "`mark`" であるすべての{{domxref("PerformanceEntry","パフォーマンスエントリー", "", 1)}}が削除されます。 -

戻り値

+### 返値 -
-
void
-
+- void + - : -

+## 例 -

次の例は、clearMarks() メソッドの両方の使用法を示しています。

+次の例は、`clearMarks()` メソッドの両方の使用法を示しています。 -
// Create a small helper to show how many PerformanceMark entries there are.
+```js
+// PerformanceMark のエントリーがいくつあるかを表示する小さなヘルパーを作成します。
 function logMarkCount() {
   console.log(
     "Found this many entries: " + performance.getEntriesByType("mark").length
@@ -61,32 +61,12 @@ logMarkCount() // "Found this many entries: 4"
 // Delete all of the PerformanceMark entries.
 performance.clearMarks();
 logMarkCount() // "Found this many entries: 0"
-
- -

仕様

- - - - - - - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('User Timing Level 2', '#dom-performance-clearmarks', 'clearMarks()')}}{{Spec2('User Timing Level 2')}}clearMarks() を明確にします。
{{SpecName('User Timing', '#dom-performance-clearmarks', 'clearMarks()')}}{{Spec2('User Timing')}}基本的な定義
- -

ブラウザの互換性

- -
-

{{Compat("api.Performance.clearMarks")}}

-
+``` + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} diff --git a/files/ja/web/api/performance/clearmeasures/index.md b/files/ja/web/api/performance/clearmeasures/index.md index 7a1fa2b6af..52e603483f 100644 --- a/files/ja/web/api/performance/clearmeasures/index.md +++ b/files/ja/web/api/performance/clearmeasures/index.md @@ -3,42 +3,41 @@ title: performance.clearMeasures() slug: Web/API/Performance/clearMeasures tags: - API - - Web パフォーマンス - メソッド - リファレンス + - ウェブパフォーマンス +browser-compat: api.Performance.clearMeasures translation_of: Web/API/Performance/clearMeasures --- -
{{APIRef("User Timing API")}}
+{{APIRef("User Timing API")}} -

clearMeasures() メソッドは、ブラウザのパフォーマンスエントリバッファから名前付きメジャーを削除します。
- メソッドが引数なしで呼び出された場合、エントリタイプが  "measure" の{{domxref("PerformanceEntry","パフォーマンスエントリ")}} はすべてパフォーマンスエントリバッファから削除されます。

+**`clearMeasures()`** メソッドは、ブラウザーのパフォーマンスエントリーバッファーから*名前付きメジャー*を削除します。このメソッドが引数なしで呼び出された場合、{{domxref("PerformanceEntry.entryType","エントリー種別", "", 1)}}が "`measure`" の{{domxref("PerformanceEntry","パフォーマンスエントリー", "", 1)}}がすべてパフォーマンスエントリーバッファーから削除されます。 -

{{AvailableInWorkers}}

+{{AvailableInWorkers}} -

構文

+## 構文 -
performance.clearMeasures();
-performance.clearMeasures(name);
-
+```js +performance.clearMeasures(); +performance.clearMeasures(name); +``` -

引数

+### 引数 -
-
name {{optional_inline}}
-
タイムスタンプの名前を表す {{domxref("DOMString")}}。この引数を省略すると、{{domxref("PerformanceEntry.entryType","エントリタイプ")}}が  "measure" の{{domxref("PerformanceEntry","パフォーマンスエントリ")}}がすべて削除されます。
-
+- name {{optional_inline}} + - : タイムスタンプの名前を表す {{domxref("DOMString")}} です。 この引数を省略すると、{{domxref("PerformanceEntry.entryType","エントリー種別", "", 1)}}が "`measure`" であるすべての{{domxref("PerformanceEntry","パフォーマンスエントリー", "", 1)}}が削除されます。 -

戻り値

+### 返値 -
-
void
-
+- void + - : -

+## 例 -

次の例は、clearMeasures() メソッドの両方の使用方法を示しています。

+次の例は、`clearMeasures()` メソッドの両方の使用方法を示しています。 -
// Create a small helper to show how many PerformanceMeasure entries there are.
+```js
+// Create a small helper to show how many PerformanceMeasure entries there are.
 function logMeasureCount() {
   console.log(
     "Found this many entries: " + performance.getEntriesByType("measure").length
@@ -63,32 +62,12 @@ logMeasureCount() // "Found this many entries: 3"
 // Delete all of the PerformanceMeasure entries.
 performance.clearMeasures();
 logMeasureCount() // "Found this many entries: 0"
-
- -

仕様

- - - - - - - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('User Timing Level 2', '#dom-performance-clearmeasures', 'clearMeasures()')}}{{Spec2('User Timing Level 2')}}clearMeasures() を明確にします。
{{SpecName('User Timing', '#dom-performance-clearmeasures', 'clearMeasures()')}}{{Spec2('User Timing')}}基本的な定義
- -

ブラウザの互換性

- -
-

{{Compat("api.Performance.clearMeasures")}}

-
+``` + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} diff --git a/files/ja/web/api/performance/clearresourcetimings/index.md b/files/ja/web/api/performance/clearresourcetimings/index.md index 62b46febce..4705213fb1 100644 --- a/files/ja/web/api/performance/clearresourcetimings/index.md +++ b/files/ja/web/api/performance/clearresourcetimings/index.md @@ -3,39 +3,38 @@ title: performance.clearResourceTimings() slug: Web/API/Performance/clearResourceTimings tags: - API - - Web パフォーマンス - メソッド - リファレンス + - ウェブパフォーマンス +browser-compat: api.Performance.clearResourceTimings translation_of: Web/API/Performance/clearResourceTimings --- -
{{APIRef("Resource Timing API")}}
+{{APIRef("Resource Timing API")}} -

clearResourceTimings() メソッドは、{{domxref("PerformanceEntry.entryType","entryType")}} が "resource" のすべての{{domxref("PerformanceEntry","パフォーマンスエントリ")}}をブラウザのパフォーマンスデータバッファから削除し、パフォーマンスデータバッファのサイズをゼロに設定します。ブラウザのパフォーマンスデータバッファのサイズを設定するには、{{domxref("Performance.setResourceTimingBufferSize()")}} メソッドを使用します。

+**`clearResourceTimings()`** メソッドは、{{domxref("PerformanceEntry.entryType","entryType")}} が "`resource`" のすべての {{domxref("PerformanceEntry","パフォーマンスエントリー")}}をブラウザーのパフォーマンスデータバッファーから削除し、パフォーマンスデータバッファーのサイズをゼロに設定します。ブラウザーのパフォーマンスデータバッファーのサイズを設定するには、{{domxref("Performance.setResourceTimingBufferSize()")}} メソッドを使用してください。 -

{{AvailableInWorkers}}

+{{AvailableInWorkers}} -

構文

+## 構文 -
performance.clearResourceTimings();
-
+```js +performance.clearResourceTimings(); +``` -

引数

+### 引数 -
-
void
-
 
-
+- void + - : -

戻り値

+### 返値 -
-
なし
-
このメソッドには戻り値はありません。
-
+- なし + - : このメソッドに返値はありません。 -

+## 例 -
function load_resource() {
+```js
+function load_resource() {
   var image = new Image();
   image.src = "https://developer.mozilla.org/static/img/opengraph-logo.png";
 }
@@ -62,27 +61,12 @@ function clear_performance_timings() {
   else
     console.log("... Performance data buffer NOT cleared!");
 }
-
+``` -

仕様

+## 仕様書 - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('Resource Timing', '#dom-performance-clearresourcetimings', 'clearResourceTimings()')}}{{Spec2('Resource Timing')}}初期定義
+{{Specifications}} -

ブラウザの互換性

+## ブラウザーの互換性 -
-

{{Compat("api.Performance.clearResourceTimings")}}

-
+{{Compat}} diff --git a/files/ja/web/api/performance/getentries/index.md b/files/ja/web/api/performance/getentries/index.md index b8d0602839..bcb2920765 100644 --- a/files/ja/web/api/performance/getentries/index.md +++ b/files/ja/web/api/performance/getentries/index.md @@ -3,34 +3,35 @@ title: performance.getEntries() slug: Web/API/Performance/getEntries tags: - API - - Web パフォーマンス - メソッド - リファレンス + - ウェブパフォーマンス +browser-compat: api.Performance.getEntries translation_of: Web/API/Performance/getEntries --- -
{{APIRef("Performance Timeline API")}}
+{{APIRef("Performance Timeline API")}} -

getEntries() メソッドは、そのページのすべての {{domxref("PerformanceEntry")}} オブジェクトのリストを返します。リストのメンバ (エントリ) は、明示的な時点でパフォーマンスマークまたはメジャーを作成することで (たとえば {{domxref("Performance.mark","mark()")}} メソッドを呼び出すことで) 作成できます。特定の種類のパフォーマンスエントリや特定の名前のパフォーマンスエントリにのみ関心がある場合は、{{domxref("Performance.getEntriesByType", "getEntriesByType()")}} と {{domxref("Performance.getEntriesByName", "getEntriesByName()")}} を参照してください。

+**`getEntries()`** メソッドは、そのページのすべての {{domxref("PerformanceEntry")}} オブジェクトのリストを返します。リストのメンバー(エントリー)は、明示的な時点でパフォーマンスマークまたはメジャーを作成することで(たとえば {{domxref("Performance.mark","mark()")}} メソッドを呼び出すことで)作成できます。特定の種類のパフォーマンスエントリーや特定の名前のパフォーマンスエントリーにのみ関心がある場合は、 {{domxref("Performance.getEntriesByType", "getEntriesByType()")}} と {{domxref("Performance.getEntriesByName", "getEntriesByName()")}} を参照してください。 -

{{AvailableInWorkers}}

+{{AvailableInWorkers}} -

構文

+## 構文 -

一般的な構文:

+一般的な構文: -
entries = window.performance.getEntries();
-
+```js +entries = window.performance.getEntries(); +``` -

戻り値

+### 返値 -
-
entries
-
{{domxref("PerformanceEntry")}} オブジェクトの配列。項目はエントリ '{{domxref("PerformanceEntry.startTime","startTime")}} に基づいて時系列に並んでいます。
-
+- entries + - : {{domxref("PerformanceEntry")}} オブジェクトの配列。項目はエントリー '{{domxref("PerformanceEntry.startTime","startTime")}} に基づいて時系列に並んでいます。 -

+## 例 -
function use_PerformanceEntry_methods() {
+```js
+function use_PerformanceEntry_methods() {
   console.log("PerformanceEntry tests ...");
 
   if (performance.mark === undefined) {
@@ -50,14 +51,14 @@ translation_of: Web/API/Performance/getEntries
 
   // Use getEntries() to iterate through the each entry
   let p = performance.getEntries();
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     console.log("Entry[" + i + "]");
     check_PerformanceEntry(p[i]);
   }
 
   // Use getEntriesByType() to get all "mark" entries
   p = performance.getEntriesByType("mark");
-  for (let i=0; i < p.length; i++) {
+  for (let i=0; i < p.length; i++) {
     console.log ("Mark only entry[" + i + "]: name = " + p[i].name +
          "; startTime = " + p[i].startTime +
          "; duration  = " + p[i].duration);
@@ -65,38 +66,18 @@ translation_of: Web/API/Performance/getEntries
 
   // Use getEntriesByName() to get all "mark" entries named "Begin"
   p = performance.getEntriesByName("Begin", "mark");
-  for (let i=0; i < p.length; i++) {
+  for (let i=0; i < p.length; i++) {
     console.log ("Mark and Begin entry[" + i + "]: name = " + p[i].name +
          "; startTime = " + p[i].startTime +
          "; duration  = " + p[i].duration);
   }
 }
-
- -

仕様

- - - - - - - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('Performance Timeline Level 2', '#dom-performance-getentries', 'getEntries()')}}{{Spec2('Performance Timeline Level 2')}} 
{{SpecName('Performance Timeline', '#dom-performance-getentries', 'getEntries()')}}{{Spec2('Performance Timeline')}}初期定義
- -

ブラウザの互換性

- -
-

{{Compat("api.Performance.getEntries")}}

-
+``` + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} diff --git a/files/ja/web/api/performance/getentriesbyname/index.md b/files/ja/web/api/performance/getentriesbyname/index.md index 6678a8f984..34eb412529 100644 --- a/files/ja/web/api/performance/getentriesbyname/index.md +++ b/files/ja/web/api/performance/getentriesbyname/index.md @@ -3,41 +3,41 @@ title: performance.getEntriesByName() slug: Web/API/Performance/getEntriesByName tags: - API - - Web パフォーマンス - メソッド - リファレンス + - ウェブパフォーマンス +browser-compat: api.Performance.getEntriesByName translation_of: Web/API/Performance/getEntriesByName --- -
{{APIRef("Performance Timeline API")}}
+{{APIRef("Performance Timeline API")}} -

getEntriesByName() メソッドは、指定された名前タイプの {{domxref("PerformanceEntry")}} オブジェクトのリストを返します。リストのメンバ (エントリ) は、明示的な時点でパフォーマンスマークまたはメジャーを作成することで (たとえば {{domxref("Performance.mark","mark()")}} メソッドを呼び出すことで) 作成できます。

+**`getEntriesByName()`** メソッドは、指定された*名前*と*種別*の {{domxref("PerformanceEntry")}} オブジェクトのリストを返します。リストのメンバー(*エントリー*)は、明示的な時点でパフォーマンス*マーク*または*メジャー*を作成することで(たとえば {{domxref("Performance.mark","mark()")}} メソッドを呼び出すことで)作成できます。 -

{{AvailableInWorkers}}

+{{AvailableInWorkers}} -

構文

+## 構文 -
entries = window.performance.getEntriesByName(name, type);
-
+```js +entries = window.performance.getEntriesByName(name, type); +``` -

引数

+### 引数 -
-
name
-
取得するエントリの名前
-
type {{optional_inline}}
-
"mark" など、取得するエントリの種類。有効なエントリタイプは {{domxref("PerformanceEntry.entryType")}} に一覧表示されています。
+- name + - : 取得するエントリーの名前 +- type {{optional_inline}} + - : "`mark`" など、取得するエントリーの種類。有効なエントリー種別の一覧は {{domxref("PerformanceEntry.entryType")}} にあります。
-

戻り値

+### 返値 -
-
entries
-
指定された nametype を持つ {{domxref("PerformanceEntry")}} オブジェクトのリスト。 type 引数が指定されていない場合は、返されるエントリを決定するために名前だけが使用されます。項目はエントリ '{{domxref("PerformanceEntry.startTime","startTime")}} に基づいて時系列に並んでいます。指定された基準を満たすオブジェクトがない場合は、空のリストが返されます。
-
+- entries + - : 指定された `name` と `type` を持つ {{domxref("PerformanceEntry")}} オブジェクトのリスト。 `type` 引数が指定されていない場合は、返されるエントリーを決定するために名前だけが使用されます。項目はエントリー '{{domxref("PerformanceEntry.startTime","startTime")}} に基づいて時系列に並んでいます。指定された基準を満たすオブジェクトがない場合は、空のリストが返されます。 -

+## 例 -
function use_PerformanceEntry_methods() {
+```js
+function use_PerformanceEntry_methods() {
   log("PerformanceEntry tests ...");
 
   if (performance.mark === undefined) {
@@ -57,21 +57,21 @@ translation_of: Web/API/Performance/getEntriesByName
 
   // Use getEntries() to iterate through the each entry
   var p = performance.getEntries();
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log("Entry[" + i + "]");
     check_PerformanceEntry(p[i]);
   }
 
   // Use getEntries(name, entryType) to get specific entries
   p = performance.getEntries({name : "Begin", entryType: "mark"});
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log("Begin[" + i + "]");
     check_PerformanceEntry(p[i]);
   }
 
   // Use getEntriesByType() to get all "mark" entries
   p = performance.getEntriesByType("mark");
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log ("Mark only entry[" + i + "]: name = " + p[i].name +
          "; startTime = " + p[i].startTime +
          "; duration  = " + p[i].duration);
@@ -79,38 +79,18 @@ translation_of: Web/API/Performance/getEntriesByName
 
   // Use getEntriesByName() to get all "mark" entries named "Begin"
   p = performance.getEntriesByName("Begin", "mark");
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log ("Mark and Begin entry[" + i + "]: name = " + p[i].name +
          "; startTime = " + p[i].startTime +
          "; duration  = " + p[i].duration);
   }
 }
-
- -

仕様

- - - - - - - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('Performance Timeline Level 2', '#dom-performance-getentriesbyname', 'getEntriesByName()')}}{{Spec2('Performance Timeline Level 2')}} 
{{SpecName('Performance Timeline', '#dom-performance-getentriesbyname', 'getEntriesByName()')}}{{Spec2('Performance Timeline')}}初期定義
- -

ブラウザの互換性

- -
-

{{Compat("api.Performance.getEntriesByName")}}

-
+``` + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} diff --git a/files/ja/web/api/performance/getentriesbytype/index.md b/files/ja/web/api/performance/getentriesbytype/index.md index 7244ff580b..ff3e681505 100644 --- a/files/ja/web/api/performance/getentriesbytype/index.md +++ b/files/ja/web/api/performance/getentriesbytype/index.md @@ -3,39 +3,38 @@ title: performance.getEntriesByType() slug: Web/API/Performance/getEntriesByType tags: - API - - Web パフォーマンス - メソッド - リファレンス + - ウェブパフォーマンス +browser-compat: api.Performance.getEntriesByType translation_of: Web/API/Performance/getEntriesByType --- -
{{APIRef("Performance Timeline API")}}
+{{APIRef("Performance Timeline API")}} -

getEntriesByType() メソッドは、指定された型の {{domxref("PerformanceEntry")}} オブジェクトのリストを返します。リストのメンバ (エントリ) は、明示的な時点でパフォーマンスマークまたはメジャーを作成することで (たとえば {{domxref("Performance.mark","mark()")}} メソッドを呼び出すことで) 作成できます。

+**`getEntriesByType()`** メソッドは、指定された型の {{domxref("PerformanceEntry")}} オブジェクトのリストを返します。リストのメンバー(エントリー)は、明示的な時点でパフォーマンス*マーク*または*メジャー*を作成することで(たとえば {{domxref("Performance.mark","mark()")}} メソッドを呼び出すことで)作成できます。 -

{{AvailableInWorkers}}

+{{AvailableInWorkers}} -

構文

+## 構文 -
entries = window.performance.getEntriesByType(type);
-
+```js +entries = window.performance.getEntriesByType(type); +``` -

引数

+### 引数 -
-
type
-
"mark" など、取得するエントリの種類。有効なエントリタイプは {{domxref("PerformanceEntry.entryType")}} に一覧表示されています。
-
+- type + - : "`mark`" など、取得するエントリーの種類。有効なエントリー種別の一覧は {{domxref("PerformanceEntry.entryType")}} にあります。 -

戻り値

+### 返値 -
-
entries
-
指定された type を持つ {{domxref("PerformanceEntry")}} オブジェクトのリスト。項目はエントリ '{{domxref("PerformanceEntry.startTime","startTime")}} に基づいて時系列に並んでいます。指定された type を持つオブジェクトがない場合、または引数が指定されていない場合は、空のリストが返されます。
-
+- entries + - : 指定された `type` を持つ {{domxref("PerformanceEntry")}} オブジェクトのリスト。項目はエントリーの {{domxref("PerformanceEntry.startTime","startTime")}} に基づいて時系列に並んでいます。指定された `type` を持つオブジェクトがない場合、または引数が指定されていない場合は、空のリストが返されます。 -

+## 例 -
function usePerformanceEntryMethods() {
+```js
+function usePerformanceEntryMethods() {
   log("PerformanceEntry tests ...");
 
   if (performance.mark === undefined) {
@@ -55,21 +54,21 @@ translation_of: Web/API/Performance/getEntriesByType
 
   // Use getEntries() to iterate through the each entry
   var p = performance.getEntries();
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log("Entry[" + i + "]");
     checkPerformanceEntry(p[i]);
   }
 
   // Use getEntries(name, entryType) to get specific entries
   p = performance.getEntries({name : "Begin", entryType: "mark"});
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log("Begin[" + i + "]");
     checkPerformanceEntry(p[i]);
   }
 
   // Use getEntriesByType() to get all "mark" entries
   p = performance.getEntriesByType("mark");
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log ("Mark only entry[" + i + "]: name = " + p[i].name +
          "; startTime = " + p[i].startTime +
          "; duration  = " + p[i].duration);
@@ -77,38 +76,18 @@ translation_of: Web/API/Performance/getEntriesByType
 
   // Use getEntriesByName() to get all "mark" entries named "Begin"
   p = performance.getEntriesByName("Begin", "mark");
-  for (var i=0; i < p.length; i++) {
+  for (var i=0; i < p.length; i++) {
     log ("Mark and Begin entry[" + i + "]: name = " + p[i].name +
          "; startTime = " + p[i].startTime +
          "; duration  = " + p[i].duration);
   }
 }
-
- -

仕様

- - - - - - - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('Performance Timeline Level 2', '#dom-performance-getentriesbytype', 'getEntriesByType()')}}{{Spec2('Performance Timeline Level 2')}} 
{{SpecName('Performance Timeline', '#dom-performance-getentriesbytype', 'getEntriesByType()')}}{{Spec2('Performance Timeline')}}初期定義
- -

ブラウザの互換性

- -
-

{{Compat("api.Performance.getEntriesByType")}}

-
+``` + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} diff --git a/files/ja/web/api/performance/setresourcetimingbuffersize/index.md b/files/ja/web/api/performance/setresourcetimingbuffersize/index.md index 3c8a46ce8a..ac5b5d063f 100644 --- a/files/ja/web/api/performance/setresourcetimingbuffersize/index.md +++ b/files/ja/web/api/performance/setresourcetimingbuffersize/index.md @@ -3,41 +3,40 @@ title: performance.setResourceTimingBufferSize() slug: Web/API/Performance/setResourceTimingBufferSize tags: - API - - Web パフォーマンス - メソッド - リファレンス + - ウェブパフォーマンス +browser-compat: api.Performance.setResourceTimingBufferSize translation_of: Web/API/Performance/setResourceTimingBufferSize --- -
{{APIRef("Resource Timing API")}}
+{{APIRef("Resource Timing API")}} -

setResourceTimingBufferSize() メソッドは、ブラウザのリソースタイミングバッファサイズを、指定された数の "resource" {{domxref("PerformanceEntry.entryType","performance entry type")}} オブジェクトに設定します。

+**`setResourceTimingBufferSize()`** メソッドは、ブラウザーのリソースタイミングバッファーサイズを、指定された数の "`resource`" の {{domxref("PerformanceEntry.entryType","パフォーマンスエントリー種別")}}のオブジェクトに設定します。 -

ブラウザの推奨リソースタイミングバッファサイズは少なくとも 150 {{domxref("PerformanceEntry","performance entry")}} オブジェクトです。

+ブラウザーの推奨リソースタイミングバッファサイズは少なくとも{{domxref("PerformanceEntry","パフォーマンスエントリー")}}オブジェクト 150 件分です。 -

{{AvailableInWorkers}}

+{{AvailableInWorkers}} -

構文

+## 構文 -
performance.setResourceTimingBufferSize(maxSize);
-
+```js +performance.setResourceTimingBufferSize(maxSize); +``` -

引数

+### 引数 -
-
maxSize
-
ブラウザがパフォーマンスエントリバッファに保持する必要がある {{domxref("PerformanceEntry","performance entry")}} オブジェクトの最大数を表す number
-
+- maxSize + - : `number` で、ブラウザーがパフォーマンスエントリーバッファーに保持する必要がある{{domxref("PerformanceEntry","パフォーマンスエントリー")}}オブジェクトの最大数を表します。 -

戻り値

+### 返値 -
-
なし
-
このメソッドには戻り値はありません。
-
+- なし + - : このメソッドには返値はありません。 -

+## 例 -
function setResourceTimingBufferSize(maxSize) {
+```js
+function setResourceTimingBufferSize(maxSize) {
   if (performance === undefined) {
     log("Browser does not support Web Performance");
     return;
@@ -50,27 +49,12 @@ translation_of: Web/API/Performance/setResourceTimingBufferSize
     log("... Performance.setResourceTimingBufferSize() = NOT supported");
   }
 }
-
+``` -

仕様

+## 仕様書 - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('Resource Timing', '#dom-performance-setresourcetimingbuffersize', 'setResourceTimingBufferSize()')}}{{Spec2('Resource Timing')}}初期定義
+{{Specifications}} -

ブラウザの互換性

+## ブラウザーの互換性 -
-

{{Compat("api.Performance.setResourceTimingBufferSize")}}

-
+{{Compat}} diff --git a/files/ja/web/api/performance/tojson/index.md b/files/ja/web/api/performance/tojson/index.md index 16ed75efdc..e45210fcf3 100644 --- a/files/ja/web/api/performance/tojson/index.md +++ b/files/ja/web/api/performance/tojson/index.md @@ -3,62 +3,46 @@ title: performance.toJSON() slug: Web/API/Performance/toJSON tags: - API - - パフォーマンス - メソッド + - パフォーマンス - リファレンス +browser-compat: api.Performance.toJSON translation_of: Web/API/Performance/toJSON --- -
{{APIRef("High Resolution Timing")}}
+{{APIRef("High Resolution Timing")}} -

{{domxref("Performance")}} インターフェイスの toJSON() メソッドは標準のシリアライザです。パフォーマンスオブジェクトのプロパティの JSON 表現を返します。

+**`toJSON()`** は {{domxref("Performance")}} インターフェイスのメソッドで、標準のシリアライザーです。パフォーマンスオブジェクトのプロパティの JSON 表現を返します。 -

{{availableinworkers}}

+{{availableinworkers}} -

構文

+## 構文 -
myPerf = performance.toJSON()
-
+```js +myPerf = performance.toJSON() +``` -

引数

+### 引数 -
-
なし
-
 
-
+- なし + - : -

戻り値

+### 返値 -
-
myPerf
-
{{domxref("Performance")}} オブジェクトのシリアル化である JSON オブジェクト
-
+- myPerf + - : {{domxref("Performance")}} オブジェクトをシリアライズした JSON オブジェクト。 -

+## 例 -
var js;
+```js
+var js;
 js = window.performance.toJSON();
 console.log("json = " + JSON.stringify(js));
-
+``` -

仕様

+## 仕様書 - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('Highres Time Level 2', '#dom-performance-tojson', 'toJSON() serializer')}}{{Spec2('Highres Time Level 2')}}toJson()を定義します。
+{{Specifications}} -

ブラウザの互換性

+## ブラウザーの互換性 -
-

{{Compat("api.Performance.toJSON")}}

-
+{{Compat}} -- cgit v1.2.3-54-g00ecf