MutationRecord : Object
Instance Properties
The name of the attribute that changed. Only applies when type
is 'attributes'
. See also attributeNamespace
.
Example:
RunResults:
The namespace of the attribute that changed. Only applies when type
is 'attributes'
. See also attributeName
.
The previous value of the attribute or data. Only applies when type
is 'attributes'
or 'characterData'
. You must specify the attributeOldValue
or characterDataOldValue
option to MutationObserver.observe() for the oldValue to be recorded.
Example:
RunResults:
The Node that the mutation happened on. If the subtree
option was specified when calling MutationObserver.observe()
this may be a descendant of the target
passed to observe()
.
Example:
RunResults:
The type of mutation. Will be one of 'attributes'
, 'childList'
, or 'characterData'
.
It will be 'attributes'
if an Element.attribute changed. To receive attribute changes, the options passed to observe()
must have attributes
set to true
, attributesOldValue
set to true
, or attributeFilter
set to an array of attribute names.
It will be 'childList'
if the Node.childNodes changed. To receive childList changes, the options passed to observe()
must have childList
set to true
.
It will be 'characterData'
if the CharacterData.data changed. To receive characterData changes, the options passed to observe()
must have characterData
set to true
.
Set the subtree
option to true
in the call to observe()
to receive any of these changes on nodes in the subtree.