mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
Require FormDataEventInit dictionary
This commit is contained in:
parent
3a21261f69
commit
94565c4088
3 changed files with 4 additions and 16 deletions
|
@ -5,7 +5,7 @@
|
|||
use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::FormDataEventBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::FormDataEventBinding::FormDataEventMethods;
|
||||
use crate::dom::bindings::error::{Error, Fallible};
|
||||
use crate::dom::bindings::error::Fallible;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
|
@ -56,21 +56,12 @@ impl FormDataEvent {
|
|||
let bubbles = EventBubbles::from(init.parent.bubbles);
|
||||
let cancelable = EventCancelable::from(init.parent.cancelable);
|
||||
|
||||
let form_data = match init.formData {
|
||||
Some(ref form_data) => form_data.clone(),
|
||||
None => {
|
||||
return Err(Error::Type(
|
||||
"required member formData is undefined".to_string(),
|
||||
));
|
||||
},
|
||||
};
|
||||
|
||||
let event = FormDataEvent::new(
|
||||
&window.global(),
|
||||
Atom::from(type_),
|
||||
bubbles,
|
||||
cancelable,
|
||||
&*form_data,
|
||||
&*init.formData.clone(),
|
||||
);
|
||||
|
||||
Ok(event)
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
// https://html.spec.whatwg.org/multipage/#the-formdataevent-interface
|
||||
[Exposed=Window]
|
||||
interface FormDataEvent : Event {
|
||||
[Throws] constructor(DOMString type, optional FormDataEventInit eventInitDict = {});
|
||||
[Throws] constructor(DOMString type, FormDataEventInit eventInitDict);
|
||||
readonly attribute FormData formData;
|
||||
};
|
||||
|
||||
dictionary FormDataEventInit : EventInit {
|
||||
/*required*/ FormData formData;
|
||||
required FormData formData;
|
||||
};
|
||||
|
|
|
@ -1409,9 +1409,6 @@
|
|||
[SubmitEvent interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[FormDataEvent interface object length]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[idlharness.https.html?include=(Document|Window)]
|
||||
[Document interface: documentWithHandlers must inherit property "queryCommandEnabled(DOMString)" with the proper type]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue