BlockSuite API Documentation / @blocksuite/blocks / on
Function: on()
Call Signature
on<
T
,K
,M
>(element
,event
,handler
,options
?): () =>void
Type Parameters
• T extends HTMLElement
• K extends string
| number
| symbol
• M = HTMLElementEventMap
Parameters
element
T
event
K
handler
(ev
) => void
options?
boolean
| AddEventListenerOptions
Returns
Function
Returns
void
Defined in
packages/affine/shared/dist/utils/event.d.ts:21
Call Signature
on<
T
>(element
,event
,handler
,options
?): () =>void
Type Parameters
• T extends HTMLElement
Parameters
element
T
event
string
handler
(ev
) => void
options?
boolean
| AddEventListenerOptions
Returns
Function
Returns
void
Defined in
packages/affine/shared/dist/utils/event.d.ts:22
Call Signature
on<
T
,K
,M
>(element
,event
,handler
,options
?): () =>void
Type Parameters
• T extends Document
• K extends string
| number
| symbol
• M = DocumentEventMap
Parameters
element
T
event
K
handler
(ev
) => void
options?
boolean
| AddEventListenerOptions
Returns
Function
Returns
void
Defined in
packages/affine/shared/dist/utils/event.d.ts:23