vue-lynx / withModifiers
Function: withModifiers()
Wraps an event handler with Lynx event modifiers.
Supported modifiers:
.once— handler is invoked at most once; subsequent events are ignored.stop— registers the event ascatchEvent(native Lynx stop-propagation) and also callsevent.stopPropagation()for DOM environments.prevent— accepted for code portability; no-op on Lynx (no browser default actions exist).self— skips the handler unless the event target is the listener element
The wrapped function is cached on fn._withMods keyed by the modifier
string so that stable function references survive re-renders.
.stop sets _lynxCatch = true on the wrapper so that patchProp can
register the event as catchEvent — the native Lynx mechanism for stopping
event bubbling. Calling stopPropagation() at the JS level alone is not
sufficient because native Lynx bubbling is decided before JS handlers run.
Parameters
Returns
Function
Parameters
Returns
unknown
Defined in
packages/vue-lynx/runtime/src/index.ts:1114