From 9704f0ae1ddb639215222aa65599e00e89a1706f Mon Sep 17 00:00:00 2001 From: "zhiping.lzp" Date: Sun, 12 Feb 2017 15:50:22 +0800 Subject: [PATCH] Fix#31: Add two clarifications for "Mutation observers". --- sections/nodes.include | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sections/nodes.include b/sections/nodes.include index 1506f62b..a275c514 100644 --- a/sections/nodes.include +++ b/sections/nodes.include @@ -561,7 +561,8 @@ interface HTMLCollection {

Mutation observers

-

Each unit of related similar-origin browsing contexts has a mutation observer compound microtask queued flag and an associated list of MutationObserver objects which is initially empty. +

Each unit of related similar-origin browsing contexts has a mutation observer compound microtask queued flag, which is initially unset, +and an associated list of MutationObserver objects, which is initially empty.

To queue a mutation observer compound microtask, run these steps: @@ -598,7 +599,13 @@ interface HTMLCollection {

Each node has an associated list of registered observers. -

A registered observer consists of an observer (a MutationObserver object) and options (a MutationObserverInit dictionary). A transient registered observer is a specific type of registered observer that has a source which is a registered observer.Mutation observers +

A registered observer consists of an observer (a MutationObserver object) and options (a MutationObserverInit dictionary). + A transient registered observer is a specific type of registered observer that has a source which is a registered observer. + +

Transient registered observers are used to track +mutations within a given node's descendants after node has been +removed so they do not get lost when subtree is set to true on node's +parent.

Interface MutationObserver

@@ -760,7 +767,7 @@ dictionary MutationObserverInit { [Exposed=Window] interface MutationRecord { readonly attribute DOMString type; - readonly attribute Node target; + [SameObject] readonly attribute Node target; [SameObject] readonly attribute NodeList addedNodes; [SameObject] readonly attribute NodeList removedNodes; readonly attribute Node? previousSibling;