blockly > WorkspaceSvg > getButtonCallback

WorkspaceSvg.getButtonCallback() method

Get the callback function associated with a given key, for clicks on buttons and labels in the flyout.


getButtonCallback(key: string): ((p1: FlyoutButton) => void) | null;


Parameter Type Description
key string The name to use to look up the function.


((p1: FlyoutButton) => void) | null

The function corresponding to the given key for this workspace; null if no callback is registered.