// Thrown (as a rejection) by a cancelled run: an async algorithm whose handle's cancel() was called, a layout's promise() after layout.cancel(), or either when cy.destroy() ran while the run was in flight
cytoscape.CancelledError: CancelledErrorThrown (as a rejection) by a cancelled run: an async algorithm whose handle's cancel() was called, a layout's promise() after layout.cancel(), or either when cy.destroy() ran while the run was in flight. error.name is 'CancelledError', so a .catch can tell a cancellation from a defect without importing the class.
Returns
CancelledErrorExample
const error = new cytoscape.CancelledError();console.log(error instanceof cytoscape.CancelledError); // true