mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1518442 - Part 1: Implement FormDataEvent interface; r=smaug,edgar
Differential Revision: https://phabricator.services.mozilla.com/D43985 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2054019eb7
commit
98aa8fdbb8
@ -177,6 +177,7 @@ EVENT(durationchange, eDurationChange, EventNameType_HTML, eBasicEventClass)
|
||||
EVENT(emptied, eEmptied, EventNameType_HTML, eBasicEventClass)
|
||||
EVENT(ended, eEnded, EventNameType_HTML, eBasicEventClass)
|
||||
EVENT(finish, eMarqueeFinish, EventNameType_HTMLMarqueeOnly, eBasicEventClass)
|
||||
EVENT(formdata, eFormData, EventNameType_HTML, eBasicEventClass)
|
||||
EVENT(fullscreenchange, eFullscreenChange, EventNameType_HTML, eBasicEventClass)
|
||||
EVENT(fullscreenerror, eFullscreenError, EventNameType_HTML, eBasicEventClass)
|
||||
EVENT(input, eEditorInput, EventNameType_HTMLXUL, eEditorInputEventClass)
|
||||
|
@ -130,6 +130,12 @@ const kEventConstructors = {
|
||||
return new FontFaceSetLoadEvent(aName, aProps);
|
||||
},
|
||||
},
|
||||
FormDataEvent: { create (aName, aProps) {
|
||||
return new FormDataEvent(aName, {
|
||||
formData: new FormData()
|
||||
});
|
||||
},
|
||||
},
|
||||
GamepadEvent: { create (aName, aProps) {
|
||||
return new GamepadEvent(aName, aProps);
|
||||
},
|
||||
|
@ -384,6 +384,8 @@ var interfaceNamesInGlobalScope = [
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{ name: "FormData", insecureContext: true },
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{ name: "FormDataEvent", insecureContext: true },
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{ name: "FontFace", insecureContext: true },
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{ name: "FontFaceSet", insecureContext: true },
|
||||
|
@ -51,6 +51,7 @@ interface GlobalEventHandlers {
|
||||
attribute EventHandler ondurationchange;
|
||||
attribute EventHandler onemptied;
|
||||
attribute EventHandler onended;
|
||||
attribute EventHandler onformdata;
|
||||
attribute EventHandler oninput;
|
||||
attribute EventHandler oninvalid;
|
||||
attribute EventHandler onkeydown;
|
||||
|
20
dom/webidl/FormDataEvent.webidl
Normal file
20
dom/webidl/FormDataEvent.webidl
Normal file
@ -0,0 +1,20 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* The origin of this IDL file is
|
||||
* https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#the-formdataevent-interface
|
||||
*/
|
||||
|
||||
[Exposed=Window,
|
||||
Constructor(DOMString type, optional FormDataEventInit eventInitDict = {})]
|
||||
interface FormDataEvent : Event {
|
||||
// C++ can't deal with a method called FormData() in the generated code
|
||||
[BinaryName="GetFormData"]
|
||||
readonly attribute FormData formData;
|
||||
};
|
||||
|
||||
dictionary FormDataEventInit : EventInit {
|
||||
required FormData formData;
|
||||
};
|
@ -1043,6 +1043,7 @@ GENERATED_EVENTS_WEBIDL_FILES = [
|
||||
'DeviceProximityEvent.webidl',
|
||||
'ErrorEvent.webidl',
|
||||
'FontFaceSetLoadEvent.webidl',
|
||||
'FormDataEvent.webidl',
|
||||
'FrameCrashedEvent.webidl',
|
||||
'GamepadAxisMoveEvent.webidl',
|
||||
'GamepadButtonEvent.webidl',
|
||||
|
@ -130,6 +130,7 @@ NS_EVENT_MESSAGE(eFormSelect)
|
||||
NS_EVENT_MESSAGE(eFormInvalid)
|
||||
NS_EVENT_MESSAGE(eFormCheckboxStateChange)
|
||||
NS_EVENT_MESSAGE(eFormRadioStateChange)
|
||||
NS_EVENT_MESSAGE(eFormData)
|
||||
|
||||
// Need separate focus/blur notifications for non-native widgets
|
||||
NS_EVENT_MESSAGE(eFocus)
|
||||
|
@ -2016,6 +2016,7 @@ STATIC_ATOMS = [
|
||||
Atom("ontimeout", "ontimeout"),
|
||||
Atom("ontimeupdate", "ontimeupdate"),
|
||||
Atom("onended", "onended"),
|
||||
Atom("onformdata", "onformdata"),
|
||||
Atom("onratechange", "onratechange"),
|
||||
Atom("ondurationchange", "ondurationchange"),
|
||||
Atom("onvolumechange", "onvolumechange"),
|
||||
|
Loading…
Reference in New Issue
Block a user