Home > blockly > Xml > blockToDomWithXY
Xml.blockToDomWithXY() function
Encode a block subtree as XML with XY coordinates.
Signature:
export declare function blockToDomWithXY(block: Block, opt_noId?: boolean): Element | DocumentFragment;
Parameters
| Parameter | Type | Description |
|---|---|---|
| block | Block | The root block to encode. |
| opt_noId | boolean | (Optional) True if the encoder should skip the block ID. |
Returns:
Element | DocumentFragment
Tree of XML elements or an empty document fragment if the block was an insertion marker.