Issue #1792 - Part 2: Move GetParentObject() to EventTarget.h for re-use.

This commit is contained in:
Moonchild 2021-07-12 02:56:48 +00:00 committed by roytam1
commit dd06472de7
2 changed files with 7 additions and 4 deletions

View file

@ -26,6 +26,7 @@ class Event;
class EventListener;
class EventListenerOptionsOrBoolean;
class EventHandlerNonNull;
class GlobalObject;
template <class T> struct Nullable;
@ -55,6 +56,11 @@ public:
ErrorResult& aRv);
bool DispatchEvent(JSContext* aCx, Event& aEvent, ErrorResult& aRv);
nsIGlobalObject* GetParentObject() const
{
return GetOwnerGlobal();
}
// Note, this takes the type in onfoo form!
EventHandlerNonNull* GetEventHandler(const nsAString& aType)
{