blockly > Xml > clearWorkspaceAndLoadFromXml
Xml.clearWorkspaceAndLoadFromXml() function
Clear the given workspace then decode an XML DOM and create blocks on the workspace.
Signature:
export declare function clearWorkspaceAndLoadFromXml(xml: Element, workspace: WorkspaceSvg): string[];
Parameters
Parameter | Type | Description |
---|---|---|
xml | Element | XML DOM. |
workspace | WorkspaceSvg | The workspace. |
Returns:
string[]
An array containing new block IDs.