// Resolve once the next matching event fires on any element of this collection — the promise form of one()
eles.promiseOn(events: string): Promise<Event<NodeData, EdgeData>>Resolve once the next matching event fires on any element of this collection — the promise form of one().
| Name | Description |
|---|---|
events: string | one or more space-separated event names |
Returns
Promise<Event<NodeData, EdgeData>>a promise for the event object
Example
const next = cy.getElementById('a').promiseOn('example');cy.getElementById('a').emit('example');console.log((await next).type); // 'example'Also spelled eles.pon.