Does anyone know why when you create an HTML component using the Template literals it always returns null? ex: I created a list and I want to get the li to put an event, but it always returns null, since it exists in the DOM.
const $container = doc.querySelector('[data-js="container"]');
const $categorie = doc.querySelectorAll('[data-js="categorie"] li');
const markup = '
<ul data-js='categorie'>
<li>item</li>
<li>item</li>
<li>item</li>
</ul>
';
$container.innerHTML = markup;