function executeEventListeners(listeners, ...parameters) {
  listeners.forEach((listener) => {
    try {
      listener.apply(null, parameters)
    } catch (error) {
      console.error("An event listener threw an error", error)
    }
  })
}
function executeEventListeners(listeners, ...parameters) {
  listeners.forEach((listener) => {
    try {
      listener.apply(null, parameters)
    } catch (error) {
      console.error("An event listener threw an error", error)
    }
  })
}
function executeEventListeners ( listeners , ... parameters ) { listeners . forEach ( ( listener ) => { try { listener . apply ( null , parameters ) } catch ( error ) { console . error ( "An event listener threw an error" , error ) } } ) }
Executes the provided event listeners with the provided parameters. Any
errors thrown by the executed event listeners will be caught and logged to
the console, and then the remaining event listeners will be executed.

@param {function(...*)[]} listeners The event listeners to execute.
@param {...*} parameters The parameters to pass to the event listeners as
arguments.
Executes the provided event listeners with the provided parameters . Any errors thrown by the executed event listeners will be caught and logged to the console and then the remaining event listeners will be executed .