replace innerHTML += with proper appendChild

This commit is contained in:
2026-06-05 07:43:43 +03:00
parent 6fab93ebeb
commit d01bbaca54
2 changed files with 7 additions and 3 deletions

View File

@@ -1,7 +1,9 @@
export const b = {}
export function addCollection(ev, sender, el) {
el.innerHTML += b.templates.collectionItem;
const parser = new DOMParser();
const e = parser.parseFromString(b.templates.collectionItem, 'text/html').body.firstElementChild;
el.appendChild(e);
}
export function deleteCollection(ev, sender, el) {