// FIXME: 1. If the field element has a name attribute specified and its value is not the empty string, let name be that value followed by a single U+002E FULL STOP character (.). Otherwise, let name be the empty string.
// FIXME: 2. Let namex be the string consisting of the concatenation of name and a single U0078 LATIN SMALL LETTER X character (x).
// FIXME: 3. Let namey be the string consisting of the concatenation of name and a single U+0079 LATIN SMALL LETTER Y character (y).
// FIXME: 4. The field element is submitter, and before this algorithm was invoked the user indicated a coordinate. Let x be the x-component of the coordinate selected by the user, and let y be the y-component of the coordinate selected by the user.
// FIXME: 5. Create an entry with namex and x, and append it to entry list.
// FIXME: 6. Create an entry with namey and y, and append it to entry list.
// 7. Continue.
continue;
}
// FIXME: 3. If the field is a form-associated custom element, then perform the entry construction algorithm given field and entry list, then continue.
// 4. If either the field element does not have a name attribute specified, or its name attribute's value is the empty string, then continue.
if(control->name().is_empty())
continue;
// 5. Let name be the value of the field element's name attribute.
// 6. If the field element is a select element, then for each option element in the select element's list of options whose selectedness is true and that is not disabled, create an entry with name and the value of the option element, and append it to entry list.
// 1. If there are no selected files, then create an entry with name and a new File object with an empty name, application/octet-stream as type, and an empty body, and append it to entry list.
// FIXME: 9. Otherwise, if the field element is an input element whose type attribute is in the Hidden state and name is an ASCII case-insensitive match for "_charset_":
// FIXME: 1. Let charset be the name of encoding if encoding is given, and "UTF-8" otherwise.
// FIXME: 2. Create an entry with name and charset, and append it to entry list.
// 10. Otherwise, create an entry with name and the value of the field element, and append it to entry list.
// FIXME: 11. If the element has a dirname attribute, and that attribute's value is not the empty string, then:
// FIXME: 1. Let dirname be the value of the element's dirname attribute.
// FIXME: 2. Let dir be the string "ltr" if the directionality of the element is 'ltr', and "rtl" otherwise (i.e., when the directionality of the element is 'rtl').
// FIXME: 3. Create an entry with dirname and dir, and append it to entry list.
}
// 6. Let form data be a new FormData object associated with entry list.
// 7. Fire an event named formdata at form using FormDataEvent, with the formData attribute initialized to form data and the bubbles attribute initialized to true.