Skip to content

cy.ready

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

cy.ready — Core › Initialisation and lifecycle

Preview · Core › Initialisation and lifecycle

Read in the complete API reference · All API members

// Resolves once the render pipeline is usable (immediately when headless) — and, under an initial cy.load(), once its first chunk is drawn (headless, once it is in the model)
cy.ready: Promise<Core<NodeData, EdgeData>>

Resolves once the render pipeline is usable (immediately when headless) — and, under an initial cy.load(), once its first chunk is drawn (headless, once it is in the model). Rejects when no adapter can be had.

Returns Promise<Core<NodeData, EdgeData>>

Example

await cy.ready;
console.log(cy.isReady()); // true

Example graph and handle setup