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

Method newBlock

packages/blockly/core/workspace.ts:426–431  ·  view source on GitHub ↗

* Obtain a newly created block. * * @param prototypeName Name of the language object containing type-specific * functions for this block. * @param opt_id Optional ID. Use this ID if provided, otherwise create a new * ID. * @returns The created block.

(prototypeName: string, opt_id?: string)

Source from the content-addressed store, hash-verified

424 * @returns The created block.
425 */
426 newBlock(prototypeName: string, opt_id?: string): Block {
427 throw new Error(
428 'The implementation of newBlock should be ' +
429 'monkey-patched in by blockly.ts',
430 );
431 }
432
433 /**
434 * Obtain a newly created comment.

Callers 15

domToBlockHeadlessFunction · 0.45
appendPrivateFunction · 0.45
text.tsFile · 0.45
lists.tsFile · 0.45
logic.tsFile · 0.45
createTestBlocksFunction · 0.45
block_test.jsFile · 0.45
comment_test.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected