Function: bind()
function bind(
node,
name,
thisObject,
func,
options?
): Data;
Defined in: packages/blockly/core/browser_events.ts:107
Bind an event handler that should be called regardless of whether it is part of the active touch stream. Use this for events that are not part of a multi-part gesture (e.g. mouseover for tooltips).
Parameters
| Parameter | Type | Description |
|---|---|---|
node | EventTarget | Node upon which to listen. |
name | string | Event name to listen to (e.g. 'mousedown'). |
thisObject | object | null | The value of 'this' in the function. |
func | Function | Function to call when event is triggered. |
options? | AddEventListenerOptions | An object with options controlling the behavior of the event listener. Passed through directly as the third argument to addEventListener. |
Returns
Opaque data that can be passed to unbindEvent_.