blockly > WorkspaceSvg > getButtonCallback
WorkspaceSvg.getButtonCallback() method
Get the callback function associated with a given key, for clicks on buttons and labels in the flyout.
Signature:
getButtonCallback(key: string): ((p1: FlyoutButton) => void) | null;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The name to use to look up the function. |
Returns:
((p1: FlyoutButton) => void) | null
The function corresponding to the given key for this workspace; null if no callback is registered.