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/mark/index.html | 101 --------------------------- 1 file changed, 101 deletions(-) delete mode 100644 files/ja/web/api/performance/mark/index.html (limited to 'files/ja/web/api/performance/mark/index.html') diff --git a/files/ja/web/api/performance/mark/index.html b/files/ja/web/api/performance/mark/index.html deleted file mode 100644 index 1a02bd4154..0000000000 --- a/files/ja/web/api/performance/mark/index.html +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: performance.mark() -slug: Web/API/Performance/mark -tags: - - API - - Webパフォーマンス - - メソッド - - リファレンス -translation_of: Web/API/Performance/mark ---- -
{{APIRef("User Timing API")}}
- -

mark() メソッドは、ブラウザのパフォーマンスエントリバッファに、指定された名前で{{domxref("DOMHighResTimeStamp","timestamp")}} を作成します。アプリケーション定義のタイムスタンプは、{{domxref("Performance")}} インタフェースの getEntries*() メソッド ({{domxref("Performance.getEntries","getEntries()")}}、{{domxref("Performance.getEntriesByName","getEntriesByName()")}} または{{domxref("Performance.getEntriesByType","getEntriesByType()")}}) のいずれかによって取得できます。

- -

{{AvailableInWorkers}}

- -

mark の {{domxref("PerformanceEntry","performance entry")}} は、次のプロパティ値を持ちます。

- - - -

このメソッドに与えられた name が {{domxref("PerformanceTiming")}} インターフェイスにすでに存在する場合、{{jsxref("SyntaxError")}} がスローされます。

- -

構文

- -
performance.mark(name);
-
- -

引数

- -
-
name
-
マークの名前を表す {{domxref("DOMString")}}。
-
- -

戻り値

- -
-
void
-
 
-
- -

- -

次の例は、mark() を使用して {{domxref("PerformanceMark")}} エントリを作成および取得する方法を示しています。

- -
// たくさんの mark を作成します。
-performance.mark("squirrel");
-performance.mark("squirrel");
-performance.mark("monkey");
-performance.mark("monkey");
-performance.mark("dog");
-performance.mark("dog");
-
-// PerformanceMark エントリをすべて取得します。
-const allEntries = performance.getEntriesByType("mark");
-console.log(allEntries.length);
-// 6
-
-// "monkey" PerformanceMark エントリをすべて入手します。
-const monkeyEntries = performance.getEntriesByName("monkey");
-console.log(monkeyEntries.length);
-// 2
-
-// すべての mark を消去します。
-performance.clearMarks();
-
- -

仕様

- - - - - - - - - - - - - - - - - - - -
仕様書ステータスコメント
{{SpecName('User Timing Level 2', '#dom-performance-mark', 'mark()')}}{{Spec2('User Timing Level 2')}} -

mark() 処理モデルを明確にします。

-
{{SpecName('User Timing', '#dom-performance-mark', 'mark()')}}{{Spec2('User Timing')}}基本的な定義
- -

ブラウザの互換性

- -
-

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

-
-- cgit v1.2.3-54-g00ecf