From 9957290b5a27555aeebd9c8ce0e6891fee747fee Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 23 Apr 2018 09:13:00 +0200 Subject: moebius#123: DOM - Events - support createEvent("FocusEvent") https://github.com/MoonchildProductions/moebius/pull/123 --- dom/events/EventDispatcher.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dom') diff --git a/dom/events/EventDispatcher.cpp b/dom/events/EventDispatcher.cpp index a1d0675ae3..65f01844b9 100644 --- a/dom/events/EventDispatcher.cpp +++ b/dom/events/EventDispatcher.cpp @@ -1056,6 +1056,11 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, LOG_EVENT_CREATION(STORAGEEVENT); return NS_NewDOMStorageEvent(aOwner); } + if (aEventType.LowerCaseEqualsLiteral("focusevent")) { + RefPtr event = NS_NewDOMFocusEvent(aOwner, aPresContext, nullptr); + event->MarkUninitialized(); + return event.forget(); + } #undef LOG_EVENT_CREATION -- cgit v1.2.3