diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index af25f97e1c..9622b21d3e 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -908,6 +908,7 @@ GK_ATOM(onreadsuccess, "onreadsuccess") GK_ATOM(onready, "onready") GK_ATOM(onreadystatechange, "onreadystatechange") GK_ATOM(onreceived, "onreceived") +GK_ATOM(onrejectionhandled, "onrejectionhandled") GK_ATOM(onremoteheld, "onremoteheld") GK_ATOM(onremoteresumed, "onremoteresumed") GK_ATOM(onrequestprogress, "onrequestprogress") @@ -951,6 +952,7 @@ GK_ATOM(ontransitionend, "ontransitionend") GK_ATOM(ontransitionrun, "ontransitionrun") GK_ATOM(ontransitionstart, "ontransitionstart") GK_ATOM(onunderflow, "onunderflow") +GK_ATOM(onunhandledrejection, "onunhandledrejection") GK_ATOM(onunload, "onunload") GK_ATOM(onupdatefound, "onupdatefound") GK_ATOM(onupdateready, "onupdateready") diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index c4edc1fe2a..0a17b5f147 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -578,14 +578,14 @@ WINDOW_EVENT(popstate, ePopState, EventNameType_XUL | EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass) -// Not supported yet -// WINDOW_EVENT(redo) +WINDOW_EVENT(rejectionhandled, eRejectionHandled, + EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass) WINDOW_EVENT(storage, eStorage, EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass) -// Not supported yet -// WINDOW_EVENT(undo) +WINDOW_EVENT(unhandledrejection, eUnhandledRejection, + EventNameType_HTMLBodyOrFramesetOnly, eBasicEventClass) WINDOW_EVENT(unload, eUnload, (EventNameType_XUL | EventNameType_SVGSVG | diff --git a/dom/webidl/EventHandler.webidl b/dom/webidl/EventHandler.webidl index f7acb66ef4..853067bd6f 100644 --- a/dom/webidl/EventHandler.webidl +++ b/dom/webidl/EventHandler.webidl @@ -160,7 +160,9 @@ interface WindowEventHandlers { attribute EventHandler onpagehide; attribute EventHandler onpageshow; attribute EventHandler onpopstate; + attribute EventHandler onrejectionhandled; attribute EventHandler onstorage; + attribute EventHandler onunhandledrejection; attribute EventHandler onunload; }; diff --git a/dom/webidl/WorkerGlobalScope.webidl b/dom/webidl/WorkerGlobalScope.webidl index 25cfe9e294..7afba6c367 100644 --- a/dom/webidl/WorkerGlobalScope.webidl +++ b/dom/webidl/WorkerGlobalScope.webidl @@ -25,6 +25,8 @@ interface WorkerGlobalScope : EventTarget { attribute EventHandler onoffline; attribute EventHandler ononline; + attribute EventHandler onrejectionhandled; + attribute EventHandler onunhandledrejection; // also has additional members in a partial interface }; diff --git a/dom/workers/WorkerScope.h b/dom/workers/WorkerScope.h index 81d2733efe..ffbe4fca75 100644 --- a/dom/workers/WorkerScope.h +++ b/dom/workers/WorkerScope.h @@ -151,6 +151,8 @@ public: IMPL_EVENT_HANDLER(online) IMPL_EVENT_HANDLER(offline) + IMPL_EVENT_HANDLER(rejectionhandled) + IMPL_EVENT_HANDLER(unhandledrejection) void Dump(const Optional& aString) const; diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index 7ff16c4841..03ae940dc8 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -118,7 +118,9 @@ NS_EVENT_MESSAGE(eImageAbort) NS_EVENT_MESSAGE(eLoadError) NS_EVENT_MESSAGE(eLoadEnd) NS_EVENT_MESSAGE(ePopState) +NS_EVENT_MESSAGE(eRejectionHandled) NS_EVENT_MESSAGE(eStorage) +NS_EVENT_MESSAGE(eUnhandledRejection) NS_EVENT_MESSAGE(eBeforeUnload) NS_EVENT_MESSAGE(eReadyStateChange)