Skip to content

cy.unmount()

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

cy.unmount — Core › Initialisation and lifecycle

Preview · Core › Initialisation and lifecycle

Read in the complete API reference · All API members

// Detach the renderer: the instance becomes headless (the model is CPU-canonical, so nothing is lost)
cy.unmount(): this

Detach the renderer: the instance becomes headless (the model is CPU-canonical, so nothing is lost). No-op when already headless.

Returns this

Example

// Detach a rendered core without removing its graph data.
cy.unmount();
console.log(cy.nodes().length); // 3

Example graph and handle setup