MCPcopy
hub / github.com/RaspberryPiFoundation/blockly / getBlockById

Method getBlockById

packages/blockly/core/workspace.ts:641–643  ·  view source on GitHub ↗

* Find the block on this workspace with the specified ID. * * @param id ID of block to find. * @returns The sought after block, or null if not found.

(id: string)

Source from the content-addressed store, hash-verified

639 * @returns The sought after block, or null if not found.
640 */
641 getBlockById(id: string): Block | null {
642 return this.blockDB.get(id) || null;
643 }
644
645 /**
646 * Set a block on this workspace with the specified ID.

Callers 15

changeListenerFunction · 0.45
constructorMethod · 0.45
appendDomToWorkspaceFunction · 0.45
mutatorOpenListenerFunction · 0.45
extractObjectFromEventFunction · 0.45
currentLocationMethod · 0.45
runMethod · 0.45
runMethod · 0.45
disableOrphansFunction · 0.45
runMethod · 0.45
runMethod · 0.45
allShadowBlocksFunction · 0.45

Calls 1

getMethod · 0.80

Tested by

no test coverage detected