Allow creation of "PageTransitionEvent" via createEvent.

Rather than "PageTransition", since it's what IE uses.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2022-11-04 21:08:43 +02:00 committed by Jacek Caban
parent f27a49964c
commit 9bf698b1a8

View File

@ -860,7 +860,7 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
if (aEventType.LowerCaseEqualsLiteral("beforeunloadevent"))
return NS_NewDOMBeforeUnloadEvent(aOwner, aPresContext, nullptr);
// XXXkhuey this is broken
if (aEventType.LowerCaseEqualsLiteral("pagetransition")) {
if (aEventType.LowerCaseEqualsLiteral("pagetransitionevent")) {
PageTransitionEventInit init;
return PageTransitionEvent::Constructor(aOwner, EmptyString(), init);
}