Skip to content

indexOf

Gets the position of a node among this node’s children.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function indexOf(this: Node, other: Node): number

Parameters:

Parameter Type Description
this Node
other Node The child node to locate.

Returns: number — The index of other among this node’s child nodes, or -1 when it is not a child of this node.