before

open external override fun before(vararg nodes: Node)(source)
open external override fun before(vararg nodes: String)(source)

Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.

Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

MDN Reference