Skip to content

Documentation

Ryan Jentzsch edited this page Sep 1, 2017 · 8 revisions

Documentation for ember-cli-dom-observer

Implementation of MutationObserver / DOM Mutation Observers as an Ember component.


Properties

Property Name Type Description
childList bool Set to true if additions and removals of the target node's child elements (including text nodes) are to be observed.
attributes bool Set to true if mutations to target's attributes are to be observed.
characterData bool Set to true if mutations to target's data are to be observed.
subtree bool Set to true if mutations to target and target's descendants are to be observed.
attributeOldValue bool Set to true if attributes is set to true and target's attribute value before the mutation needs to be recorded.
characterDataOldValue bool Set to true if characterData is set to true and target's data before the mutation needs to be recorded.
attributeFilter string JSON array Set to an array of attribute local names (without namespace) if not all attribute mutations need to be observed.
targetId string Set to the id of the element that should be observed.

Methods

handleMutations(array mutationRecord[], MutationObserver observer)

Description: Action method acting as the callback function for observed elements.

Parameters:

mutationRecord - mutationRecord

MutationObserver - MutationObserver

Examples

``

Clone this wiki locally