type

MutationRec

src @Js
class MutationRec : Obj

MutationRec represents an individual DOM mutation.

fields

added

List of nodes added, or empyt list if no nodes added.

attr

Name of the changed attribute, or null if no attribute was changed.

attrNs

Namespace of the changed attribute, or null if no attribute was changed.

nextSibling

Next sibling of the added or removed nodes, or null if no nodes added or removed.

oldVal

Old value, depending on type

prevSibling

Previous sibling of the added or removed nodes, or null if not nodes added or removed.

removed

List of nodes removed, or empty list if no nodes removed.

target

Target node that mutation affected, depending on the type

type

Mutation type

Slot Details

added

src Elem[] added

List of nodes added, or empyt list if no nodes added.

attr

src Str? attr

Name of the changed attribute, or null if no attribute was changed.

attrNs

src Str? attrNs

Namespace of the changed attribute, or null if no attribute was changed.

nextSibling

src Elem? nextSibling

Next sibling of the added or removed nodes, or null if no nodes added or removed.

oldVal

src Str? oldVal

Old value, depending on type:

  • For "attrs", it is the value of the changed attribute before the change
  • For "charData", it is the data of the changed node before the change
  • For "childList", it is null

prevSibling

src Elem? prevSibling

Previous sibling of the added or removed nodes, or null if not nodes added or removed.

removed

src Elem[] removed

List of nodes removed, or empty list if no nodes removed.

target

src Elem target

Target node that mutation affected, depending on the type:

  • For "attrs", it is the element whose attribute changed
  • For "charData", it is the CharacterData node
  • For "childList", it is the node whose children changed

type

src Str type

Mutation type:

  • "attrs" if the mutation was an attribute mutation
  • "charData" if it was a mutation to a CharacterData node
  • "childList" if it was a mutation to the tree of nodes