Open
Description
https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore reads:
referenceNode
The node before whichnewNode
is inserted. If this isnull
, thennewNode
is inserted at the end of node's child nodes.
but Node.insertBefore
requires a reference node to be provided.
Possible workaround:
case referenceNode of
Just r -> Node.insertBefore newNode r this
Nothing -> Node.appendChild newNode this
Metadata
Metadata
Assignees
Labels
No labels