aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/mutationobserver/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/mutationobserver/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/mutationobserver/disconnect')
-rw-r--r--files/ja/web/api/mutationobserver/disconnect/index.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/files/ja/web/api/mutationobserver/disconnect/index.html b/files/ja/web/api/mutationobserver/disconnect/index.html
new file mode 100644
index 0000000000..3bbd4cbd6c
--- /dev/null
+++ b/files/ja/web/api/mutationobserver/disconnect/index.html
@@ -0,0 +1,74 @@
+---
+title: MutationObserver.disconnect()
+slug: Web/API/MutationObserver/disconnect
+translation_of: Web/API/MutationObserver/disconnect
+---
+<div>{{APIRef("DOM WHATWG")}}</div>
+
+<p><span class="seoSummary">{{domxref("MutationObserver")}} の <code><strong>disconnect()</strong></code> メソッドは、オブザーバーに変更の監視を停止させます。</span> オブザーバーは、 {{domxref("MutationObserver.observe", "observe()")}} メソッドを再度呼び出すことで再利用できます。</p>
+
+<ul>
+</ul>
+
+<h2 id="構文">構文</h2>
+
+<pre class="syntaxbox notranslate"><var>mutationObserver</var>.disconnect()
+</pre>
+
+<h3 id="引数">引数</h3>
+
+<p>なし</p>
+
+<h3 id="戻り値">戻り値</h3>
+
+<p><code>undefined</code></p>
+
+<div class="note">
+<p><strong>注:</strong> すでに検知されているものの、まだオブザーバーに報告されていない変更の通知は、すべて破棄されます。</p>
+</div>
+
+<h2 id="使用における注意点">使用における注意点</h2>
+
+<p>監視されている要素が DOM から削除され、その後ブラウザのガベージコレクション機構によって解放された場合、<code>MutationObserver</code> も同様に削除されます。</p>
+
+<h2 id="例">例</h2>
+
+<p>この例では、オブザーバを作成してから切断し、再利用できるようにします。</p>
+
+<pre class="brush: js notranslate">const targetNode = document.querySelector("#someElement");
+const observerOptions = {
+ childList: true,
+ attributes: true
+}
+
+const observer = new MutationObserver(callback);
+observer.observe(targetNode, observerOptions);
+
+/* some time later... */
+
+observer.disconnect();</pre>
+
+<h2 id="Specifications" name="Specifications">仕様</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-mutationobserver-disconnect', 'MutationObserver.disconnect()')}}</td>
+ <td>{{ Spec2('DOM WHATWG') }}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザ互換性">ブラウザ互換性</h2>
+
+
+
+<p>{{Compat("api.MutationObserver.disconnect")}}</p>