how can I add event listeners to elements added in html with javascript like this ?
items.forEach((cors) => {
const { top, left, width, height } = cors
container.innerHTML +=
`<div class='box'
style='top:${top}px;left:${left}px;width:${width}px;height:${height}px'>`
})
I tried to make it with javascript but it did not work