computeSGPath

Computes the SceneGraph child-index path from root to target

import { computeSGPath } from "@roku-sdk/navigation";
computeSGPath(target: DomNode, root: DomNode): string

Deprecated.

Removed in the next major release.

Description

Computes the SceneGraph child-index path from root to target.

Kept so existing imports keep compiling. Path computation is internal to RootFocusBoundary; new code should not call this.

Parameters

NameTypeDescription
targetDomNodeThe node whose path to compute, usually the focused leaf's node.
rootDomNodeThe node the path is relative to, usually the anchor node's root.

Return values

"/"-separated index string (e.g. "0/1/0/3/0"), or "" if target is not a descendant of root.


What’s Next

Did this page help you?