mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 07:17:30 +09:00
Bug 1322938 - Emit close event when HTMLDialogElement.prototype.close() is called.
Tag #1343
This commit is contained in:
parent
900df90dae
commit
c39b0e4fd7
5 changed files with 12 additions and 1 deletions
|
|
@ -172,6 +172,10 @@ EVENT(click,
|
||||||
eMouseClick,
|
eMouseClick,
|
||||||
EventNameType_All,
|
EventNameType_All,
|
||||||
eMouseEventClass)
|
eMouseEventClass)
|
||||||
|
EVENT(close,
|
||||||
|
eClose,
|
||||||
|
EventNameType_HTML,
|
||||||
|
eBasicEventClass)
|
||||||
EVENT(contextmenu,
|
EVENT(contextmenu,
|
||||||
eContextMenu,
|
eContextMenu,
|
||||||
EventNameType_HTMLXUL,
|
EventNameType_HTMLXUL,
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ HTMLDialogElement::Close(const mozilla::dom::Optional<nsAString>& aReturnValue)
|
||||||
ErrorResult ignored;
|
ErrorResult ignored;
|
||||||
SetOpen(false, ignored);
|
SetOpen(false, ignored);
|
||||||
ignored.SuppressException();
|
ignored.SuppressException();
|
||||||
|
RefPtr<AsyncEventDispatcher> eventDispatcher =
|
||||||
|
new AsyncEventDispatcher(this, NS_LITERAL_STRING("close"), false);
|
||||||
|
eventDispatcher->PostDOMEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#ifndef HTMLDialogElement_h
|
#ifndef HTMLDialogElement_h
|
||||||
#define HTMLDialogElement_h
|
#define HTMLDialogElement_h
|
||||||
|
|
||||||
|
#include "mozilla/AsyncEventDispatcher.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "nsGenericHTMLElement.h"
|
#include "nsGenericHTMLElement.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ interface GlobalEventHandlers {
|
||||||
attribute EventHandler oncanplaythrough;
|
attribute EventHandler oncanplaythrough;
|
||||||
attribute EventHandler onchange;
|
attribute EventHandler onchange;
|
||||||
attribute EventHandler onclick;
|
attribute EventHandler onclick;
|
||||||
//(Not implemented)attribute EventHandler onclose;
|
attribute EventHandler onclose;
|
||||||
attribute EventHandler oncontextmenu;
|
attribute EventHandler oncontextmenu;
|
||||||
//(Not implemented)attribute EventHandler oncuechange;
|
//(Not implemented)attribute EventHandler oncuechange;
|
||||||
attribute EventHandler ondblclick;
|
attribute EventHandler ondblclick;
|
||||||
|
|
|
||||||
|
|
@ -457,6 +457,9 @@ NS_EVENT_MESSAGE(eVisibilityChange)
|
||||||
// Details element events.
|
// Details element events.
|
||||||
NS_EVENT_MESSAGE(eToggle)
|
NS_EVENT_MESSAGE(eToggle)
|
||||||
|
|
||||||
|
// Dialog element events.
|
||||||
|
NS_EVENT_MESSAGE(eClose)
|
||||||
|
|
||||||
#ifdef UNDEF_NS_EVENT_MESSAGE_FIRST_LAST
|
#ifdef UNDEF_NS_EVENT_MESSAGE_FIRST_LAST
|
||||||
#undef UNDEF_NS_EVENT_MESSAGE_FIRST_LAST
|
#undef UNDEF_NS_EVENT_MESSAGE_FIRST_LAST
|
||||||
#undef NS_EVENT_MESSAGE_FIRST_LAST
|
#undef NS_EVENT_MESSAGE_FIRST_LAST
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue