Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
`cy.mount()` : Attach to a DOM element for rendering, after init #1937
Description of new feature
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
@d2fong Great; I'll add this to the 3.3 milestone then.
Not sure if it's worth it to support multiple mounts per core instance. Maybe it's worth trying destroying/replacing the renderer on each mount to support that usecase? If cleanly destroying the renderer without also destroying the core instance is not straight forward, then we could just support the mount-once per core instance usecase.