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

17 lines
320 B
JavaScript
Raw Normal View History

2024-01-30 10:59:28 -05:00
// 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
};