One of the W3C DOM tests exposes the fact that we don't handle custom events propertly. All custom events share a single list of event listeners.
Maciej mentioned that Anders may already be working on this, which is too bad, since I have a patch ready!
Created attachment 3484 [details] patch to use AtomicString instead of an integer as an event ID I've done some testing on this, but it still needs its own test for the layout-tests directory and some performance testing too.
This is part of the reason that the dispatchEvent12 test in the W3C DOM Level 2 Events suite is failing, but there's another reason, described in bug 4570.
Great patch! r=me
Mass moving XML DOM bugs to the "DOM" Component.