Class: ModelChangedMutation

sync.api.AuthorEditingSupport. ModelChangedMutation


new ModelChangedMutation(updated, deleted, inserted)

Object describing the changes made to the document.

The mutation can represent nodes as inserted, deleted or updated. The semantic of an updated node is that something changed in the subtree rooted at that element. These changes include attribute changes.

It can happen that, when a node is deleted or inserted the mutation is reported as an update in the subtree rooted at its parent element.

Parameters:
Name Type Description
updated Array.<sync.api.dom.Node> The nodes updated during this mutation.
deleted Array.<sync.api.dom.Node> The nodes deleted during this mutation.
inserted Array.<sync.api.dom.Node> The nodes inserted during this mutation.
Since:
  • 22.1

Members


deleted :Array.<sync.api.dom.Node>

Important: These nodes are available only during a sync.api.AuthorEditingSupport.EventType.BEFORE_MODEL_CHANGED event.

During a sync.api.AuthorEditingSupport.EventType.MODEL_CHANGED event these nodes are all detached nodes. They can only be used to count the number of deleted nodes.

Type:

inserted :Array.<sync.api.dom.Node>

Important: These nodes are available only during a sync.api.AuthorEditingSupport.EventType.MODEL_CHANGED event.

During a sync.api.AuthorEditingSupport.EventType.BEFORE_MODEL_CHANGED event these nodes are all detached nodes. They can only be used to count the number of inserted nodes.

Type:

updated :Array.<sync.api.dom.Node>

Type: