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

@:optionaloptionalsubtree: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.

@:optionaloptionalchildList:Null<Bool>

Set to true to monitor the target node (and, if subtree is true, its descendants) for the addition or removal of new child nodes. The default is false.

@:optionaloptionalcharacterDataOldValue: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.

@:optionaloptionalcharacterData: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.

@:optionaloptionalattributes:Null<Bool>

Set to true to watch for changes to the value of attributes on the node or nodes being monitored. The default value is false.

@:optionaloptionalattributeOldValue: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.

@:optionaloptionalattributeFilter: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.