Skip to content

eles.contains(other)

eles.contains — Collection > Comparison. Cytoscape.js signatures, parameters and return contract.

eles.contains — Collection › Comparison

Preview · Collection › Comparison

Read in the complete API reference · All API members

// Whether every element of other is also in this collection
eles.contains(other: Collection): boolean

Whether every element of other is also in this collection.

Parameters
NameDescription
other: Collection

the candidate subset

Returns boolean

true when other is contained

Example

const other = cy.getElementById('b');
console.log(cy.getElementById('a').contains(other)); // false

Example graph and handle setup

Also spelled eles.has.