How to use the @vue/runtime-core.callWithAsyncErrorHandling function in @vue/runtime-core

To help you get started, we’ve selected a few @vue/runtime-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vuejs / vue-next / packages / runtime-dom / src / modules / events.ts View on Github external
const invoker: Invoker = (e: Event) => {
    // async edge case #6566: inner click event triggers patch, event handler
    // attached to outer element during patch, and triggered again. This
    // happens because browsers fire microtask ticks between event propagation.
    // the solution is simple: we save the timestamp when a handler is attached,
    // and the handler would only fire if the event passed to it was fired
    // AFTER it was attached.
    if (e.timeStamp >= invoker.lastUpdated - 1) {
      callWithAsyncErrorHandling(
        invoker.value,
        instance,
        ErrorCodes.NATIVE_EVENT_HANDLER,
        [e]
      )
    }
  }
  invoker.value = initialValue
github vuejs / vue-next / packages / runtime-dom / src / components / Transition.ts View on Github external
function callHookWithErrorHandling(hook: Hook, args: any[]) {
    callWithAsyncErrorHandling(hook, instance, ErrorCodes.TRANSITION_HOOK, args)
  }