/* HTML looks like this:
<div id="div">
<button id="button">Click me!</button>
</div> */
const div = document.getElementById('div');
const button = document.getElementById('button');
div.addEventListener('click', function() { alert('Div clicked!'); });
button.addEventListener('click', function() { setTimeout(()=>{alert('Button clicked!');},0); });