children
The list of children, sorted back-to-front. That is, the first child in the array is the bottommost layer on the screen, and the last child in the array is the topmost layer.
If the manifest contains "documentAccess": "dynamic-page"
, and the node is a PageNode
, you must first call loadAsync
to access this property.
Supported on:
Signature
children: ReadonlyArray<SceneNode> [readonly]
Remarks
This array can be read like and iterated like a regular array. However, calling this property always returns a new array, and both the property and the new array are read-only.
As such, this property cannot be assigned to, and the array cannot be modified directly (it wouldn't do anything). Instead, use appendChild
, insertChild
or remove
.
If you are curious, the reason why inserting children has to be done via API calls is because our internal representation for the layer tree uses fractional indexing and insertChild
performs that conversion.