@tempots/dom

emitValue() function

Creates an event handler that emits the value of an HTMLInputElement.

Signature:

emitValue: (fn: (text: string) => void) => (event: Event) => void

Parameters

Parameter

Type

Description

fn

(text: string) => void

The callback function that will receive the emitted value.

Returns: (event: Event) => void

An event handler function that can be attached to an event listener.