Skip to content

cy.container()

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

cy.container — Core › Initialisation and lifecycle

Preview · Core › Initialisation and lifecycle

Read in the complete API reference · All API members

// The DOM element this instance renders into, or null when headless or unmounted
cy.container(): HTMLElement | null

The DOM element this instance renders into, or null when headless or unmounted.

Returns HTMLElement | null

the container element, or null

Example

console.log(cy.container()); // null

Example graph and handle setup