interface OnMutationOptions {
    categories?: CommaSeparatedStr<MutationCategory> | MutationCategory[];
    selector?: string;
    skipInitial?: boolean;
    target?: Element;
}

Properties

Specifies a list of MutationCategorys to target for.

If not given, then the handler is called for any of the supported mutations.

It can be a comma-separated list of category names or an array of such names.

undefined
selector?: string

If this is given, then the handler would only be called for operations where the target matches the given selector or contains an element matching the given selector.

undefined
skipInitial?: boolean

Do not call the handler until there's a future matching mutation.

By default, if selector is given, and categories includes added, we call the handler (almost) immediately with all elements matching selector relative to this DOMWatcher's root.

The initial operation will contain just the element and addedTo: <current parent>.

false
target?: Element

If this is given, then the handler would only be called for operations where the target is either the given element or an ancestor of it, i.e. it Node:contains it.

undefined