Skip to content

setChildrenInPlace

Replaces this node’s children with the given nodes, in order. A node that is already a child in the right place stays attached; only the unwanted children are removed and only the misplaced nodes are inserted, as Obsidian does.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function setChildrenInPlace(this: Node, children: Node[]): void

Parameters:

Parameter Type Description
this Node
children Node[] The new child nodes.

Returns: void