CodeAPI

ContainableMixin

Provides functionality for elements that can contain other elements. Some elements, such as pages, headers, footers, and boxes, can contain other elements. This occurs when you drag an element onto a container element and attach it. These attached elements are considered the parent element's children. Some actions performed on the parent, such as hiding, affect the element's children as well.

Table of Contents

PROPERTIES

?
Store values associated with an object.
childrenGets an array of the elements that are contained within the element.

children

Gets an array of the elements that are contained within the element.

Description

Some elements, such as pages, headers, footers, and boxes, can contain other elements. This occurs when you drag an element onto a container element and attach it. These attached elements are considered the parent element's children.

See Also

parent

Syntax

get children(): Array<Element>
TYPE
?
The kind of data the property stores.
Array<Element>
DEFAULT VALUE
?
The value of a property before you explicitly set it.
An empty array

Examples

Get an element's children

let myChildren = $w("#myContainer").children;

let firstChild = myChildren[0];