The Window object should be a full fledged EventTarget and implement dispatchEvent.
Created attachment 29805 [details] Patch [WIP] This patch turns makes the DOMWindow an EventTarget but it is still a WIP as I have not had time to make tests yet. I will update when I next have a chance. I am putting this up so I don't lose it.
A follow up patch should move more the window event dispatch code to DOMWindow.
Created attachment 29808 [details] patch with tests
Comment on attachment 29808 [details] patch with tests > Index: WebCore/page/DOMWindow.h > =================================================================== > --- WebCore/page/DOMWindow.h (revision 42880) > +++ WebCore/page/DOMWindow.h (working copy) > @@ -30,6 +30,7 @@ > #include "PlatformString.h" > #include "RegisteredEventListener.h" > #include "SecurityOrigin.h" > +#include "EventTarget.h" > #include <wtf/Forward.h> > #include <wtf/RefCounted.h> > #include <wtf/RefPtr.h> Please keep in ASCII order. r=me
Landed in r42882.