diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index 939c1b545e1b..e7d9792134de 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -129,6 +129,7 @@ #include "nsIJSNativeInitializer.h" #include "nsIFullScreen.h" #include "nsIStringBundle.h" +#include "nsIScriptEventManager.h" // For GetInterface() #include "plbase64.h" @@ -4116,6 +4117,17 @@ GlobalWindowImpl::GetInterface(const nsIID & aIID, void **aSink) } } } + else if (aIID.Equals(NS_GET_IID(nsIScriptEventManager))) { + nsCOMPtr doc(do_QueryInterface(mDocument)); + if (doc) { + nsCOMPtr mgr; + + doc->GetScriptEventManager(getter_AddRefs(mgr)); + if (mgr) { + *aSink = mgr; + } + } + } else { return QueryInterface(aIID, aSink); }