From fe9ea62f61d2fcc160890c38279bcecdb53d5e4d Mon Sep 17 00:00:00 2001 From: marcomow Date: Thu, 17 Jun 2021 08:23:37 +0300 Subject: [PATCH] Fix wrong element's dynamic identifier, semicols (#1080) --- examples/vanilla/todo.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/vanilla/todo.html b/examples/vanilla/todo.html index 8706fd4f3..637b978b7 100644 --- a/examples/vanilla/todo.html +++ b/examples/vanilla/todo.html @@ -26,40 +26,40 @@

Thoughts

const form = document.getElementById('form') const dynamicEvent = e => { - const target = e.target + const target = e.target; - gun.get(target.id).put(null) + gun.get(target.id).put(null); - target.innerHTML = document.getElementById(target.innerHTML) + target.innerHTML = document.getElementById(target.id); if (target.innerHTML === ' null' || target.innerHTML === ' ' || target.innerHTML === '') { - target.style.display = 'none' + target.style.display = 'none'; } else { - target.style.display = 'list-item' + target.style.display = 'list-item'; } } gun.map().on((thought, id) => { - parentList.insertAdjacentHTML('beforeend', `
  • ${thought}
  • `) + parentList.insertAdjacentHTML('beforeend', `
  • ${thought}
  • `); - const links = parentList.getElementsByTagName('li') + const links = parentList.getElementsByTagName('li'); for (const link of links) { if (link.innerHTML === ' null' || link.innerHTML === ' ' || link.innerHTML === '') { - link.style.display = 'none' + link.style.display = 'none'; } else { - link.style.display = 'list-item' + link.style.display = 'list-item'; } - link.ondblclick = dynamicEvent + link.ondblclick = dynamicEvent; } }) form.addEventListener('submit', e => { - e.preventDefault() - gun.set(input.value) - input.value = '' + e.preventDefault(); + gun.set(input.value); + input.value = ''; }) - \ No newline at end of file +