 <p>You could add one event handler for each container you actually want to receive the event in (if this is feasable in your setup):</p> <p>(somewhere:)</p> <pre><code>(function() { var container = document.getElementById('mainwrap'); container.addEventListener('click',handler,false); function handler(e) { e = e || window.event; var element = e.target || e.srcElement; console.log("Element actually clicked: ", element); console.log("Container receiving event: ", container); } })(); </code></pre> <p>Or expand to (can register handler for multiple containers..):</p> <pre><code>function registerHandlerForContainer(container_id, handler) { var container = document.getElementById(container_id); container.addEventListener('click',delegating_handler,false); function delegating_handler(e) { handler(container, e); } } function handler(container, e) { e = e || window.event; var element = e.target || e.srcElement; console.log("Element actually clicked: ", element); console.log("Container receiving event: ", container); } registerHandlerForContainer('mainwrap', handler); </code></pre>