aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/performanceobserver/disconnect
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/performanceobserver/disconnect
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/performanceobserver/disconnect')
-rw-r--r--files/ja/web/api/performanceobserver/disconnect/index.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/files/ja/web/api/performanceobserver/disconnect/index.html b/files/ja/web/api/performanceobserver/disconnect/index.html
new file mode 100644
index 0000000000..01a132af98
--- /dev/null
+++ b/files/ja/web/api/performanceobserver/disconnect/index.html
@@ -0,0 +1,67 @@
+---
+title: PeformanceObserver.disconnect()
+slug: Web/API/PerformanceObserver/disconnect
+tags:
+ - API
+ - PerformanceObserver
+ - Web パフォーマンス
+ - disconnect()
+ - オブザーバー
+ - パフォーマンスオブザーバー API
+ - メソッド
+ - リファレンス
+translation_of: Web/API/PerformanceObserver/disconnect
+---
+<div>{{APIRef("Performance Timeline API")}}</div>
+
+<p>{{domxref('PerformanceObserver')}} インターフェイスの <strong><code>disconnect()</code></strong> メソッドは、パフォーマンスオブザーバーが{{domxref("PerformanceEntry","パフォーマンスエントリ", '', 'true')}}イベントを受け取らないようにするために使用されます。</p>
+
+<h2 id="構文">構文</h2>
+
+<pre class="syntaxbox"><em>performanceObserver</em>.disconnect();
+</pre>
+
+<h2 id="例">例</h2>
+
+<pre class="brush: js">var observer = new PerformanceObserver(function(list, obj) {
+ var entries = list.getEntries();
+ for (var i=0; i &lt; entries.length; i++) {
+ // Process "mark" and "frame" events
+ }
+});
+observer.observe({entryTypes: ["mark", "frame"]});
+
+function perf_observer(list, observer) {
+ // Process the "measure" event
+ // ...
+ // Disable additional performance events
+ observer.disconnect();
+}
+var observer2 = new PerformanceObserver(perf_observer);
+observer2.observe({entryTypes: ["measure"]});
+</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('Performance Timeline Level 2', '#dom-performanceobserver-disconnect', 'disconnect()')}}</td>
+ <td>{{Spec2('Performance Timeline Level 2')}}</td>
+ <td><code>disconnect()</code> メソッドの初期定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザの互換性">ブラウザの互換性</h2>
+
+<div>
+<div class="hidden">このページの互換性テーブルは構造化データから生成されます。データに貢献したい場合は <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックして、プルリクエストを送ってください。</div>
+
+<p>{{Compat("api.PerformanceObserver.disconnect")}}</p>
+</div>