Home / Function/ createOnceHandler() — vue Function Reference

createOnceHandler() — vue Function Reference

Architecture documentation for the createOnceHandler() function in events.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  f7b43df5_6918_95d4_1c5d_e1d62f05c648["createOnceHandler()"]
  a96f977a_276b_ffab_5b5b_538f5f278c2e["events.ts"]
  f7b43df5_6918_95d4_1c5d_e1d62f05c648 -->|defined in| a96f977a_276b_ffab_5b5b_538f5f278c2e
  769113f7_4e27_8b5f_3ae3_06a5b96984c8["remove()"]
  f7b43df5_6918_95d4_1c5d_e1d62f05c648 -->|calls| 769113f7_4e27_8b5f_3ae3_06a5b96984c8
  style f7b43df5_6918_95d4_1c5d_e1d62f05c648 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/platforms/web/runtime/modules/events.ts lines 35–43

function createOnceHandler(event, handler, capture) {
  const _target = target // save current target element in closure
  return function onceHandler() {
    const res = handler.apply(null, arguments)
    if (res !== null) {
      remove(event, onceHandler, capture, _target)
    }
  }
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does createOnceHandler() do?
createOnceHandler() is a function in the vue codebase, defined in src/platforms/web/runtime/modules/events.ts.
Where is createOnceHandler() defined?
createOnceHandler() is defined in src/platforms/web/runtime/modules/events.ts at line 35.
What does createOnceHandler() call?
createOnceHandler() calls 1 function(s): remove.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free