removeAction(action) {
    if (!action) {
      throw new Error('The "action" argument is required');
    }
    if (typeof action !== 'string') {
      if (!this._valid(action)) {
        throw new Error('The "action" argument is invalid');
      }
      action = action.action;
    }
    const index = this.contextActions.findIndex((i) => i.action === action);
    if (index === -1) {
      log.debug('Context menu action ' + action + ' is not registered.');
      return false;
    }
    this.contextActions.splice(index, 1);
    return true;
  }
/**
   * Removes previously registered action.
   * @param {String|Object} action An action object used to register an action
   * or action's action property value.
   * @return {Boolean} True if the action has been removed.
   * @throws {Error} An error when the argument is invalid.
   */
Removes previously registered action.
@param {String|Object} action An action object used to register an action
or action's action property value.
@return {Boolean} True if the action has been removed.
@throws {Error} An error when the argument is invalid.
Removes previously registered action . @param { String|Object } action An action object used to register an action or action ' s action property value . @return { Boolean } True if the action has been removed . @throws { Error } An error when the argument is invalid .
removeAction(action) {
    if (!action) {
      throw new Error('The "action" argument is required');
    }
    if (typeof action !== 'string') {
      if (!this._valid(action)) {
        throw new Error('The "action" argument is invalid');
      }
      action = action.action;
    }
    const index = this.contextActions.findIndex((i) => i.action === action);
    if (index === -1) {
      log.debug('Context menu action ' + action + ' is not registered.');
      return false;
    }
    this.contextActions.splice(index, 1);
    return true;
  }
removeAction ( action ) { if ( ! action ) { throw new Error ( 'The "action" argument is required' ) ; } if ( typeof action !== 'string' ) { if ( ! this . _valid ( action ) ) { throw new Error ( 'The "action" argument is invalid' ) ; } action = action . action ; } const index = this . contextActions . findIndex ( ( i ) => i . action === action ) ; if ( index === - 1 ) { log . debug ( 'Context menu action ' + action + ' is not registered.' ) ; return false ; } this . contextActions . splice ( index , 1 ) ; return true ; }
Removes previously registered action.
Removes previously registered action .