MutationObserverInit class

MutationObserverInit class

This class represents an options collection which is used to configure MutationObserver.

The MutationObserverInit type exposes the following members:

Constructors

ConstructorDescription
initInitializes a new instance of the MutationObserverInit class.

Properties

PropertyDescription
child_listSet to true if mutations to target’s children are to be observed.
attributesSet to true if mutations to target’s attributes are to be observed. Can be omitted if attributeOldValue and/or attributeFilter is specified.
character_dataSet to true if mutations to target’s data are to be observed. Can be omitted if characterDataOldValue is specified
subtreeSet to true if mutations to not just target, but also target’s descendants are to be observed
attribute_old_valueSet to true if attributes is true or omitted and target’s attribute value before the mutation needs to be recorded.
character_data_old_valueSet to true if characterData is set to true or omitted and target’s data before the mutation needs to be recorded.
attribute_filterSet to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted.
countGets the number of key/value pairs contained in the MutationObserverInit collection.
is_read_onlyDetermines whether the MutationObserverInit collection is mutable.
keysGets a collection containing the keys in the MutationObserverInit collection.
valuesGets a collection containing the values in the MutationObserverInit collection.

Methods

MethodDescription
clearRemoves all the elements from the MutationObserverInit collection.
contains_keyDetermines whether the MutationObserverInit collection contain a specified key.
addAdds the specified key and value to the MutationObserverInit collection.
removeRemoves the value associated with the specified key from the MutationObserverInit collection.
try_get_valueGets the value associated with the specified key.

See Also