Skip to content

Latest commit

 

History

History
132 lines (62 loc) · 1.69 KB

kit.eventwatcher.md

File metadata and controls

132 lines (62 loc) · 1.69 KB

Home > @holoflows/kit > EventWatcher

EventWatcher class

A Watcher based on event handlers.

Signature:

export declare class EventWatcher<T, Before extends Element = HTMLSpanElement, After extends Element = HTMLSpanElement, SingleMode extends boolean = false> extends Watcher<T, Before, After, SingleMode> 

Extends: Watcher<T, Before, After, SingleMode>

Example

const e = new EventWatcher(ls).useForeach(node => console.log(node))
document.addEventListener('event', e.eventListener)

Constructors

Constructor

Modifiers

Description

(constructor)(liveSelector)

Constructs a new instance of the EventWatcher class

Properties

Property

Modifiers

Type

Description

eventListener

() => void

Use this function as event listener to invoke watcher.

Methods

Method

Modifiers

Description

startWatch(signal)