addAction(action) {
    if (!this._valid(action)) {
      throw new Error('The context menu action is Not valid.');
    }
    this.contextActions.push(action);
  }
/**
   * Registers an action.
   * @param {Object} action Description of the action. Each action has to contain
   * the following propertues:
   * - `label` String, laber to render in the context menu.
   * - `selector` String, CSS selector to match the action.
   * - `action` String Action name. If the module that adds the action is main
   * process mo0dule it must prefix the action with `'main:`, then listen for
   * `context-action:[action-name]` on the ipcMain. If the module works in the
   * renderer process then it must prefix the action with `renderer:`, then
   * handle a CustomEvent on the window object that is of a type of `context-action:[action-name]`.
   * No additional arguments are provided for the event.
   * @throws {Error} An error when the argument is invalid.
   */
Registers an action.
@param {Object} action Description of the action. Each action has to contain
the following propertues:
- `label` String, laber to render in the context menu.
- `selector` String, CSS selector to match the action.
- `action` String Action name. If the module that adds the action is main
process mo0dule it must prefix the action with `'main:`, then listen for
`context-action:[action-name]` on the ipcMain. If the module works in the
renderer process then it must prefix the action with `renderer:`, then
handle a CustomEvent on the window object that is of a type of `context-action:[action-name]`.
No additional arguments are provided for the event.
@throws {Error} An error when the argument is invalid.
Registers an action . @param { Object } action Description of the action . Each action has to contain the following propertues : - ` label ` String laber to render in the context menu . - ` selector ` String CSS selector to match the action . - ` action ` String Action name . If the module that adds the action is main process mo0dule it must prefix the action with ` ' main : ` then listen for ` context - action : [ action - name ] ` on the ipcMain . If the module works in the renderer process then it must prefix the action with ` renderer : ` then handle a CustomEvent on the window object that is of a type of ` context - action : [ action - name ] ` . No additional arguments are provided for the event . @throws { Error } An error when the argument is invalid .
addAction(action) {
    if (!this._valid(action)) {
      throw new Error('The context menu action is Not valid.');
    }
    this.contextActions.push(action);
  }
addAction ( action ) { if ( ! this . _valid ( action ) ) { throw new Error ( 'The context menu action is Not valid.' ) ; } this . contextActions . push ( action ) ; }
Registers an action.
Registers an action .