// (Re)attach a renderer to a container
cy.mount(container: HTMLElement): this(Re)attach a renderer to a container. Re-mounting to a different container unmounts first; the fresh renderer re-uploads every column from the CPU-canonical model and rebuilds all glyph runs.
| Name | Description |
|---|---|
container: HTMLElement | the element to render into |
thisthis
Example
// container is an existing, sized HTML element.cy.mount(document.getElementById('graph'));await cy.ready;if no container is given, if the instance was built directly rather than through the cytoscape factory (there is no renderer to attach), if it was built by cytoscape/headless or cytoscape/headless-gpu (a build with no renderer), or if WebGPU is unavailable — mounting is the one way a headless instance can demand a GPU after construction