From 96d2945591771f242a2e0dd50be77d5b2f872885 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 22 Feb 2022 01:14:08 +0900 Subject: Performance インターフェイスのメソッドの記事を移行 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/api/performance/getentries/index.html | 102 --------------------- files/ja/web/api/performance/getentries/index.md | 102 +++++++++++++++++++++ 2 files changed, 102 insertions(+), 102 deletions(-) delete mode 100644 files/ja/web/api/performance/getentries/index.html create mode 100644 files/ja/web/api/performance/getentries/index.md (limited to 'files/ja/web/api/performance/getentries') diff --git a/files/ja/web/api/performance/getentries/index.html b/files/ja/web/api/performance/getentries/index.html deleted file mode 100644 index b8d0602839..0000000000 --- a/files/ja/web/api/performance/getentries/index.html +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: performance.getEntries() -slug: Web/API/Performance/getEntries -tags: - - API - - Web パフォーマンス - - メソッド - - リファレンス -translation_of: Web/API/Performance/getEntries ---- -
{{APIRef("Performance Timeline API")}}
- -

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

- -

{{AvailableInWorkers}}

- -

構文

- -

一般的な構文:

- -
entries = window.performance.getEntries();
-
- -

戻り値

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

- -
function use_PerformanceEntry_methods() {
-  console.log("PerformanceEntry tests ...");
-
-  if (performance.mark === undefined) {
-    console.log("... performance.mark Not supported");
-    return;
-  }
-
-  // Create some performance entries via the mark() method
-  performance.mark("Begin");
-  do_work(50000);
-  performance.mark("End");
-  performance.mark("Begin");
-  do_work(100000);
-  performance.mark("End");
-  do_work(200000);
-  performance.mark("End");
-
-  // Use getEntries() to iterate through the each entry
-  let p = performance.getEntries();
-  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++) {
-    console.log ("Mark only entry[" + i + "]: name = " + p[i].name +
-         "; startTime = " + p[i].startTime +
-         "; duration  = " + p[i].duration);
-  }
-
-  // Use getEntriesByName() to get all "mark" entries named "Begin"
-  p = performance.getEntriesByName("Begin", "mark");
-  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")}}

-
diff --git a/files/ja/web/api/performance/getentries/index.md b/files/ja/web/api/performance/getentries/index.md new file mode 100644 index 0000000000..b8d0602839 --- /dev/null +++ b/files/ja/web/api/performance/getentries/index.md @@ -0,0 +1,102 @@ +--- +title: performance.getEntries() +slug: Web/API/Performance/getEntries +tags: + - API + - Web パフォーマンス + - メソッド + - リファレンス +translation_of: Web/API/Performance/getEntries +--- +
{{APIRef("Performance Timeline API")}}
+ +

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

+ +

{{AvailableInWorkers}}

+ +

構文

+ +

一般的な構文:

+ +
entries = window.performance.getEntries();
+
+ +

戻り値

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

+ +
function use_PerformanceEntry_methods() {
+  console.log("PerformanceEntry tests ...");
+
+  if (performance.mark === undefined) {
+    console.log("... performance.mark Not supported");
+    return;
+  }
+
+  // Create some performance entries via the mark() method
+  performance.mark("Begin");
+  do_work(50000);
+  performance.mark("End");
+  performance.mark("Begin");
+  do_work(100000);
+  performance.mark("End");
+  do_work(200000);
+  performance.mark("End");
+
+  // Use getEntries() to iterate through the each entry
+  let p = performance.getEntries();
+  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++) {
+    console.log ("Mark only entry[" + i + "]: name = " + p[i].name +
+         "; startTime = " + p[i].startTime +
+         "; duration  = " + p[i].duration);
+  }
+
+  // Use getEntriesByName() to get all "mark" entries named "Begin"
+  p = performance.getEntriesByName("Begin", "mark");
+  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")}}

+
-- cgit v1.2.3-54-g00ecf