coupdoeil
Version:
Javascript for Ruby on Rails Coupdoeil gem
14 lines (10 loc) • 367 B
JavaScript
export const CURRENT_POPOVERS_BY_ID = new Map()
export function currentPopoversById() {
return CURRENT_POPOVERS_BY_ID
}
export function addToCurrents(coupdoeilElement) {
CURRENT_POPOVERS_BY_ID.set(coupdoeilElement.uniqueId, coupdoeilElement)
}
export function removeFromCurrents(coupdoeilElement) {
CURRENT_POPOVERS_BY_ID.delete(coupdoeilElement.uniqueId)
}