> @gibson042 I guess I've done that in the first commit https://github.com/jure/jquery/commit/3e26d328214afcceb77e3100107ebad7e32cd365#diff-031bb62d959e7e4949d1847c82507f33R424, just a bit higher up, as that whole section doesn't make sense to run on non-element nodes. Looks like there's more than one way to address this, but there might be big performance differences between the two (two commits, two ways).

I missed the first commit, but yes, that's the right approach and in the right place. This one is large and awkward (`false` is not even a valid return value here), and will swallow events that—if we acknowledge their existence at all—should be allowed to bubble.

> With regards to the `jQuery.event.fix` issue, I added that check *before* `if nodeType == 3` gets executed and the target changed to something else. So it still works just fine. What exactly is the jsfiddle example showing? Here's how I understand it:
>
> 1. click button
> 2. previous sibling is text node, remove it
> 3. DOMNodeRemoved gets called on the text node
> 4. target gets changed to parentNode, so the container
>
> That's the first part, which I guess is fine, even though changing the target to the parentNode seems a bit strange to me. What if there are other text nodes in the parentNode, or other element nodes? We've just told jQuery that the whole container experienced a DOMNodeRemoved.

_Precisely_. jQuery's event model assumes that events on text nodes are erroneous (as they _are_ in the case of [#13143](http://bugs.jquery.com/ticket/13143)), and therefore bubbles the target up to a containing element. This is clearly incompatible with `DOMNodeRemoved`, which necessarily targets non-elements.

> So the second part of that example goes:
>
> 1. click button again
> 2. previous sibling is comment node, remove it
> 3. DOMNodeRemoved gets called on the node, nodeType 8
> 4. jQuery tries to handle it
> 5. Sizzle.attr fails because the comment nodes don't have getAttribute()
>
> What I'm saying is that steps 4 and 5 shouldn't exist. jQuery should not handle events on non-element nodes (with the exception of document, nodeType 9).

Right; we [assume](http://bugs.jquery.com/ticket/13143#comment:2) non-element targets to be in error, which is why text nodes jump up a level. It doesn't change the meaning for `mousewheel`, but it _does_ for `DOMNodeRemoved`. And if that's the only avenue by which jQuery would ever see events targeting comment nodes, then it's better for us to disclaim support than to pretend that this change will fix it.