Skip to content

ele.isChildless()

eles.isChildless — Collection > Compound nodes. Cytoscape.js signatures, parameters and return contract.

eles.isChildless — Collection › Compound nodes

Preview · Collection › Compound nodes

Read in the complete API reference · All API members

// Whether the first element is a node with no children
ele.isChildless(): boolean

Whether the first element is a node with no children.

Returns boolean

true for a node with no children; false for edges, so it is not the plain negation of isParent()

Example

console.log(eles.isChildless()); // true

Example graph and handle setup