Function addEventListener

  • The error event is sent to the global scope when an unhandled error is thrown.

    The default behavior when this event occurs is to print the error to the screen using console.error(), and no further application code is executed. The user must then press the + button to exit the application. Call event.preventDefault() to supress this default behavior.

    Parameters

    Returns void

  • The unhandledrejection event is sent to the global scope when a JavaScript Promise that has no rejection handler is rejected.

    The default behavior when this event occurs is to print the error to the screen using console.error(), and no further application code is executed. The user must then press the + button to exit the application. Call event.preventDefault() to supress this default behavior.

    Parameters

    Returns void

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

Generated using TypeDoc