__InsertElementBeforeInserts an Element node into the specified parent node, before the reference node.
| Key | Description |
|---|---|
| parent | The parent node object. |
| child | The child node to be inserted into the parent node. |
| referenceNode | The reference node before which the child node needs to be inserted. If the reference node is null, the child node will be inserted at the end. |
Returns the inserted child node.
The frontend framework can perform the insertion operation as follows.