Skip to content

Latest commit

 

History

History
93 lines (64 loc) · 2.48 KB

delegate.md

File metadata and controls

93 lines (64 loc) · 2.48 KB

Modules

delegate

Classes

Delegate

delegate

delegate.createDelegate ⇒ Delegate

Kind: static constant of delegate

Param Type Description
root HTMLElement Delegate root

delegate.delegate : Delegate

Delegate instance with root of window.document

Kind: static constant of delegate

Delegate

Kind: global class

delegate.on(eventName, element, selector, callback)

Subscribe an event

Kind: instance method of Delegate

Param Type Description
eventName String Event name
element HTMLElement Delegate node
selector String | Null Selector
callback function Callback

delegate.off([eventName], [element], [selector], [callback])

Unsubscribe an event

Kind: instance method of Delegate

Param Type Description
[eventName] String Event name
[element] HTMLElement Delegate node
[selector] String | Null Selector
[callback] function Callback

delegate.setRoot(newRoot)

Set delegate root

Kind: instance method of Delegate

Param Type Description
newRoot HTMLElement Delegate root

delegate.destroy()

Destroy delegate

Kind: instance method of Delegate