addChangedListener method

Model addChangedListener(
  1. void listener(
    1. ChangedEvent
    )
)

Register an event handler that is called when there is a ChangedEvent.

This registration does not raise a ChangedEvent. In case a Diagram's Model may be replaced, you may prefer calling Diagram#addModelChangedListener instead of this method.

Event listeners are not written out by #toJson.

Do not add or remove Changed listeners during the execution of a Changed listener. @param {function(ChangedEvent)} listener a function that takes a ChangedEvent as its argument. @see #removeChangedListener @see Diagram#addModelChangedListener @return {Model} this Model

Implementation

_i3.Model addChangedListener(void Function(_i3.ChangedEvent) listener) =>
    _i4.callMethod(
      this,
      'addChangedListener',
      [_i4.allowInterop(listener)],
    );