#cy.removeData()
// Remove all keys
cy.removeData(): thisDelete graph-level data keys. Emits a data event when anything was removed.
Returns
thisthis core, for chaining
Example
cy.data('temporary', 1);cy.removeData();console.log(cy.data('temporary')); // undefined#cy.removeData(names)
// Remove the specified keys
cy.removeData(names: string): thisDelete graph-level data keys. Emits a data event when anything was removed.
| Name | Description |
|---|---|
names: string | space-separated key names; omit to clear everything |
Returns
thisthis core, for chaining
Example
cy.data('temporary', 1);cy.removeData('temporary');console.log(cy.data('temporary')); // undefinedAlso spelled cy.removeAttr.