Get immediate child nodes of a passed element and return an array of them.
Parameters:
Name | Type | Description |
---|---|---|
el | HTMLElement | The element to get all immediate children for. |
- Since
- 1.0.0
- Source
Returns:
Iterable array of dom nodes.
- Type:
- Array
Example
import { getChildren } from "@gravityforms/utils";
function Example() {
const node = document.getElementById( 'example' );
const children = getChildren( node );
}