summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-23 09:13:00 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-23 09:13:00 +0200
commit8740e1d17d3369aca4d20e49d59480b40e0d1902 (patch)
tree5e88b91a175d59c46a01db3992cfe9085f3f77ec /dom
parent6fe71b364d7c142867c7bbf02d51e4381e1717b7 (diff)
downloaduxp-8740e1d17d3369aca4d20e49d59480b40e0d1902.tar.gz
moebius#123: DOM - Events - support createEvent("FocusEvent")
https://github.com/MoonchildProductions/moebius/pull/123
Diffstat (limited to 'dom')
-rw-r--r--dom/events/EventDispatcher.cpp5
1 files changed, 5 insertions, 0 deletions
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> event = NS_NewDOMFocusEvent(aOwner, aPresContext, nullptr);
+ event->MarkUninitialized();
+ return event.forget();
+ }
#undef LOG_EVENT_CREATION