Skip to content

cy.destroyed()

cy.destroyed — Core > Initialisation and lifecycle. Cytoscape.js signatures, parameters and return contract.

cy.destroyed — Core › Initialisation and lifecycle

Preview · Core › Initialisation and lifecycle

Read in the complete API reference · All API members

// Whether destroy() has run
cy.destroyed(): boolean

Whether destroy() has run.

Returns boolean

true once destroyed

Example

console.log(cy.destroyed()); // false
cy.destroy();
console.log(cy.destroyed()); // true

Example graph and handle setup