Say I want to do this:
document.onclick = () => {
    if (target && target.matches('[data-toggle-modal]')) {
        showModal();
    }
}
And then in another JS file:
document.onclick = () => {
    console.log('test');
}
How can this be done?
Say I want to do this:
document.onclick = () => {
    if (target && target.matches('[data-toggle-modal]')) {
        showModal();
    }
}
And then in another JS file:
document.onclick = () => {
    console.log('test');
}
How can this be done?
