aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/api/mutationobserver/observe_7e3ecc5c48e14f4ecfdbe7d3aa534870/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/conflicting/web/api/mutationobserver/observe_7e3ecc5c48e14f4ecfdbe7d3aa534870/index.html')
-rw-r--r--files/zh-cn/conflicting/web/api/mutationobserver/observe_7e3ecc5c48e14f4ecfdbe7d3aa534870/index.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/files/zh-cn/conflicting/web/api/mutationobserver/observe_7e3ecc5c48e14f4ecfdbe7d3aa534870/index.html b/files/zh-cn/conflicting/web/api/mutationobserver/observe_7e3ecc5c48e14f4ecfdbe7d3aa534870/index.html
new file mode 100644
index 0000000000..178f35ef38
--- /dev/null
+++ b/files/zh-cn/conflicting/web/api/mutationobserver/observe_7e3ecc5c48e14f4ecfdbe7d3aa534870/index.html
@@ -0,0 +1,51 @@
+---
+title: MutationObserverInit.childList
+slug: conflicting/Web/API/MutationObserver/observe_7e3ecc5c48e14f4ecfdbe7d3aa534870
+translation_of: Web/API/MutationObserverInit/childList
+original_slug: Web/API/MutationObserverInit/childList
+---
+<div>{{APIRef("DOM WHATWG")}}</div>
+
+<p><span class="seoSummary">The <strong>{{domxref("MutationObserverInit")}}</strong> dictionary's optional <strong><code>childList</code></strong> property indicates whether or not to monitor the specified node or nodes for the addition or removal of new child nodes.</span></p>
+
+<p>If <code>childList</code> is <code>false</code> (the default), adding or removing new nodes does not trigger mutation callbacks. By setting <code>childList</code> to <code>true</code>, your callback will be invoked any time nodes are added to or removed from the DOM node or nodes being watched.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">var <em>options</em> = {
+ <em>childList</em>: true | false
+}
+</pre>
+
+<h3 id="Value">Value</h3>
+
+<p>A Boolean value indicating whether or not to invoke the callback function when new nodes are added to or removed from the section of the DOM being monitored.. If {{domxref("MutationObserverInit.subtree", "subtree")}} is <code>false</code>, only the node indicated by the observer's target node is monitored for changes. Setting <code>subtree</code> to <code>true</code> causes addition or removal of nodes anywhere within the subtree rooted at <code>target</code> to be reported.</p>
+
+<h2 id="Example">Example</h2>
+
+<h2 id="Specifications" name="Specifications">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-mutationobserverinit-childlist', 'MutationObserverInit.childList')}}</td>
+ <td>{{ Spec2('DOM WHATWG') }}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("api.MutationObserverInit.childList")}}</p>
+</div>