blockly > Xml > domToBlock

Xml.domToBlock() function

Decode an XML block tag and create a block (and possibly sub blocks) on the workspace.

Signature:

export declare function domToBlock(xmlBlock: Element, workspace: Workspace): Block;

Parameters

Parameter Type Description
xmlBlock Element XML block element.
workspace Workspace The workspace.

Returns:

Block

The root block created.