How does it stopPropagation()interfere? (Add a description / how your add-on works / joins).
The only thing that does stopPropagation()is to stop the event from the bubbles to the parent of the element that received the event. Thus, event handlers on the parent object are not called. But several handlers are called for the same event directly on the element.
So ... as long as you bind the event handler directly to the element that is first generated first, you're fine. If you are just trying to listen to events, for example. on bodyand relying on all the events bubbling up to you, you are out of luck.
eg. if you now click on the red div, you will receive a warning sibling handlerand one message inline handler, although the previously defined inline- handler onclickcalls stopPropagation().
(: IE, attachEvent() cancelBubble)
<style type="text/css" media="screen">
#parent1 { background-color: green; width:300px; height:300px }
#test { background-color: red; width:200px; height:200px }
</style>
<div id="parent1">
<div id="test" onclick="javascript:event.stopPropagation();alert('inline handler');"></div>
</div>
<script type="text/javascript">
parent1.addEventListener('click',
function(e) { alert('parent'); },
false
);
test.addEventListener('click',
function(e) { alert('sibling handler'); },
false
);
</script>