moebius#123: DOM - Events - support createEvent("FocusEvent")

https://github.com/MoonchildProductions/moebius/pull/123
This commit is contained in:
janekptacijarabaci 2018-04-23 09:13:00 +02:00 committed by Roy Tam
commit f0c237ae6d
3 changed files with 5 additions and 28 deletions

View file

@ -1056,6 +1056,11 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
LOG_EVENT_CREATION(STORAGEEVENT);
return NS_NewDOMStorageEvent(aOwner);
}
if (aEventType.LowerCaseEqualsLiteral("focusevent")) {
RefPtr<Event> event = NS_NewDOMFocusEvent(aOwner, aPresContext, nullptr);
event->MarkUninitialized();
return event.forget();
}
#undef LOG_EVENT_CREATION