Skip to content

cy.mount() : Attach to a DOM element for rendering, after init #1937

Closed
@maxkfranz

Description

@maxkfranz

Description of new feature

cy.mount( container ) : Attaches the instance to the specified container, just like specifying container at init.

cy.unmount() : Detaches the instance from its container, making it a headless instance.

Motivation for new feature

Sometimes, you want to create an instance before you have the DOM element you want to render in. For example, you might pass a Cytoscape instance into a React component's props, but you can't attach to the DOM element until componentDidMount().

Feature Breakdown

  • Single use mount
  • Multi use mount

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions