Skip to main content

Function: init()

function init(
workspace,
numBlocksPerCategory?,
waitForFinishedLoading?
): void;

Defined in: index.js:188

Main entry point to initialize the suggested blocks categories.

Parameters​

ParameterTypeDefault valueDescription
workspaceWorkspaceSvgundefinedthe workspace to load into
numBlocksPerCategory?number10how many blocks should be included per category. Defaults to 10.
waitForFinishedLoading?booleantruewhether to wait until we hear the FINISHED_LOADING event before responding to BLOCK_CREATE events. Set to false if you disable events during initial load. Defaults to true.

Returns​

void