JAVASCRIPT

querySelector

const nodeList = document.querySelectorAll('myclassname');

Array.from(nodeList).forEach(el => {
    if (el !== null) {
        (async() => {
            await import(`app/module/${el.dataset.component}`);
        })();
    }
});
comments powered by Disqus