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
  c5b8690f_bf92_09a8_77eb_9fcf557a229a["createOnceHandler()"]
  fa3254df_d7fb_4fb8_94ec_97ddce44d626["events.ts"]
  c5b8690f_bf92_09a8_77eb_9fcf557a229a -->|defined in| fa3254df_d7fb_4fb8_94ec_97ddce44d626
  b7f4a8be_d3eb_eb96_4d9f_54d94a08c89e["remove()"]
  c5b8690f_bf92_09a8_77eb_9fcf557a229a -->|calls| b7f4a8be_d3eb_eb96_4d9f_54d94a08c89e
  style c5b8690f_bf92_09a8_77eb_9fcf557a229a 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