Name | Description |
---|
Name | Description |
---|---|
createEventTypes | Create event types from string array |
registerEvent | Register event for element |
registerEvents | Register events for element |
stopEventChain | Stop the event handler & bubbling |
registerElementEvents | Register onClick/onDoubleClick/onLongClick event for element |
Parameters | Type | Description |
---|---|---|
eventNames | Array | The keys of event |
Return |
---|
Object The Event types object |
const Events = createEventTypes([
'AddObject',
'RemoveObject',
]);
Parameters | Type | Description |
---|---|---|
elem | Element | Element |
type | string | The event type |
fn | Function | The event handler |
Return |
---|
Function The function which is used to unregister the event handler |
Parameters | Type | Description |
---|---|---|
elem | Element | Element |
events | Object | The key-value event handler object |
Return |
---|
Function The function which is used to unregister the event handler |
Parameters | Type | Description |
---|---|---|
event | Event | Event |
Return |
---|
No return value |
Parameters | Type | Description |
---|---|---|
elem | Element | Element |
events | Object | The key-value event handler object |
Return |
---|
Function The function which is used to unregister the event handler |