Skip to content

Event Listener

Bindings for @solid-primitives/event-listener.

Every method that takes options has two overloads: one takes an options object, the other flattens the options into optional parameters (ParamObject rebuilds the object in JavaScript).

makeEventListener

let makeEventListener(
    target: #Element,
    ``type``: string,
    handler: Event -> unit,
    options: AddEventListenerOptions
    ): DisposeCallback
let makeEventListener(
    target: #Element,
    ``type``: string,
    handler: Event -> unit,
    ?capture: bool,
    ?once: bool,
    ?passive: bool
    ): DisposeCallback

createEventListener

let createEventListener(
    target: #Element | #Element[] | Accessor<#Element> | Accessor<#Element[]>,
    ``type``: U4<string, string[], Accessor<string>, Accessor<string[]>>,
    handler: Event -> unit,
    options: AddEventListenerOptions
    ): unit
let createEventListener(
    target: #Element | #Element[] | Accessor<#Element> | Accessor<#Element[]>,
    ``type``: U4<string, string[], Accessor<string>, Accessor<string[]>>,
    handler: Event -> unit,
    ?capture: bool,
    ?once: bool,
    ?passive: bool
    ): unit

createEventSignal

let createEventSignal([<ParamArray>] args: obj[]): obj
Edit this page