adds border to any html element on click or mouseover. erases previous borders

PHOTO EMBED

Sat Jun 05 2021 19:58:23 GMT+0000 (UTC)

Saved by @shadow337 #css

document.addEventListener('mouseover', addBorder)

function addBorder(e) {
  document.querySelectorAll('*').forEach(el => el.style.border = '')
  e.target.style.border = '10px solid lime'
}
content_copyCOPY