Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/chunks/chunk.B4BZKR24.js
2024-01-30 10:59:28 -05:00

16 lines
320 B
JavaScript

// src/internal/event.ts
function waitForEvent(el, eventName) {
return new Promise((resolve) => {
function done(event) {
if (event.target === el) {
el.removeEventListener(eventName, done);
resolve();
}
}
el.addEventListener(eventName, done);
});
}
export {
waitForEvent
};