Defines the method to add an event listener, a function that will be called whenever the specified event is delivered to the target. The list of all the available events can be found here.
Name | Type | Description |
id | string | The event name. |
action | function | The event listener. |
window.Asc.plugin.attachEvent("onContextMenuShow", function(options) { if (!options) return; if (options.type === "Selection" || options.type === "Target") this.executeMethod("AddContextMenuItem", [getContextMenuItems()]); });