The MutationObserverInit
dictionary describes the configuration of a mutation observer. As such, it's primarily used as the type of the options
parameter on the MutationObserver.observe()
method.
Documentation MutationObserverInit by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
Fields
optionalsubtree:Null<Bool>
Set to true
to extend monitoring to the entire subtree of nodes rooted at target
. All of the other MutationObserverInit
properties are then extended to all of the nodes in the subtree instead of applying solely to the target
node. The default value is false
.
optionalcharacterDataOldValue:Null<Bool>
Set to true
to record the previous value of a node's text whenever the text changes on nodes being monitored. For details and an example, see /en-US/docs/Web/API/MutationObserver
. No default value.
optionalcharacterData:Null<Bool>
Set to true
to monitor the specified target node or subtree for changes to the character data contained within the node or nodes. No default value.
optionalattributes:Null<Bool>
optionalattributeOldValue:Null<Bool>
Set to true
to record the previous value of any attribute that changes when monitoring the node or nodes for attribute changes; see /en-US/docs/Web/API/MutationObserver
for details on watching for attribute changes and value recording. No default value.
optionalattributeFilter:Null<Array<String>>
An array of specific attribute names to be monitored. If this property isn't included, changes to all attributes cause mutation notifications. No default value.