Skip to main content

Home > 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

ParameterTypeDescription
xmlBlockElementXML block element.
workspaceWorkspaceThe workspace.

Returns:

Block

The root block created.