Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

observe

Description

The observe of MutationObserver for JS instructs the user agent to observe a given target (a node) and report any mutations based on the criteria given by options (an object).

Syntax

observer.observe(target, options)

Parameters

target

A node.

options

childList

Set to true if mutations to target’s children are to be observed.

attributes

Set to true if mutations to target’s attributes are to be observed. Can be omitted if attributeOldValue or attributeFilter is specified.

characterData

Set to true if mutations to target’s data are to be observed. Can be omitted if characterDataOldValue is specified.

subtree

Set to true if mutations to not just target, but also target’s descendants are to be observed.

attributeOldValue

Set to true if attributes is true or omitted and target’s attribute value before the mutation needs to be recorded.

characterDataOldValue

Set to true if characterData is set to true or omitted and target’s data before the mutation needs to be recorded.

attributeFilter

Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted.

Examples

disconnect

MutationObserver

takeRecords

Web Hypertext Application Technology Working Group (WHATWG)

HomeMenu