/**
* {@link XMLEditorEvent} sent after the user executes
* the undo or redo command.
*/
export class UndoStateChangedEvent extends XMLEditorEvent {
constructor(xmlEditor, data) {
super(xmlEditor, data, "undoStateChanged");
}
/**
* Get the <code>commandStates</code> property of this event:
* an array containing the states of commands <code>undo</code>
* and <code>redo</code>.
* <p>This array contains pairs:
* <ul>
* <li><code>enabled</code>, a boolean.
* <li><code>detail</code>, a string, the command which can be
* undone/redone.
* </li>
*
* @type {array}
* @see XMLEditor#getCommandState
*/
get commandStates() {
// Return null rather than undefined.
return !this._commandStates? null : this._commandStates;
}
}