The DOM specification says that event init calls should not do anything if the event has already been dispatched. I have a patch that addresses this on my other computer; I'll attach it to this bug ASAP.
Created attachment 4282 [details] patch that fixes this and does other cleanup
Comment on attachment 4282 [details] patch that fixes this and does other cleanup r=me, ensure it's all non-leaky and performant, etc. etc.
Mass moving XML DOM bugs to the "DOM" Component.