MutationObserverInit

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.

Properties

At a minimum, one of childList, attributes, and/or characterData must be true when you call observe(). Otherwise, a TypeError exception will be thrown.

attributeFilter Optional
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.
attributeOldValue Optional
Set to true to record the previous value of any attribute that changes when monitoring the node or nodes for attribute changes; see Monitoring attribute values in MutationObserver for details on watching for attribute changes and value recording. No default value.
attributes Optional
Set to true to watch for changes to the value of attributes on the node or nodes being monitored. The default value is false.
characterData Optional
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.
characterDataOldValue Optional
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 Monitoring text content changes in MutationObserver. No default value.
childList Optional
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.
subtree Optional
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.

Specifications

Specification Status Comment
DOM
The definition of 'MutationObserverInit' in that specification.
Living Standard  

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?
attributeFilterChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?
attributeOldValueChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, attributeOldValue has no default value; previously, its default value was false.
IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, attributeOldValue has no default value; previously, its default value was false.
Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?
attributesChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, attributes has no default value; previously, its default value was false.
IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, attributes has no default value; previously, its default value was false.
Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?
characterDataChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, characterData has no default value; previously, its default value was false.
IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, characterData has no default value; previously, its default value was false.
Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?
characterDataOldValueChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, characterDataOldValue has no default value; previously, its default value was false.
IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14
Notes
Full support 14
Notes
Notes Starting in Firefox 36, characterDataOldValue has no default value; previously, its default value was false.
Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?
childListChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?
subtreeChrome Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Full support YesFirefox Full support 14IE Full support 11Opera Full support 15Safari Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android ? Chrome Android Full support 26
Full support 26
No support 18 — 26
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 14Opera Android Full support 15Safari iOS Full support 7
Full support 7
No support 6 — 7
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

Document Tags and Contributors

Contributors to this page: ExE-Boss, Sheppy
Last updated by: ExE-Boss,