added triggerCommand and triggerEvent into frontend API

This commit is contained in:
zadam
2022-05-13 22:33:57 +02:00
parent 87b75a9a22
commit 8318ab7ac0
9 changed files with 1010 additions and 1194 deletions

View File

@@ -327,6 +327,24 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
*/
this.showError = toastService.showError;
/**
* Trigger command.
*
* @method
* @param {string} name
* @param {object} data
*/
this.triggerCommand = (name, data) => appContext.triggerCommand(name, data);
/**
* Trigger event.
*
* @method
* @param {string} name
* @param {object} data
*/
this.triggerEvent = (name, data) => appContext.triggerEvent(name, data);
/**
* @method
* @deprecated - this is now no-op since all the changes should be gracefully handled per widget