Question: should a disconnected element raise an event that will be raised by its parent?
<div id="test">
<button disabled="disabled">Click me</button>
</div>
<script type="text/javascript">
document.getElementById("test").onclick = function() {
alert("Clicked!");
};
</script>
All browsers except IE prevent the event from triggering, but IE does not. Is this behavior documented or standardized? Which browser handles the code correctly?
source
share