Re: [w3c/webcomponents] Need callback for form submit data (#187)

I'm going to start an experimental implementation of the event-based approach in Google Chrome.

In F2F, we assumed the event name was ```beforeSubmit```. IMO this should be changed to something else because this event should be dispatched in ```formElement.submit()``` case, which won't dispatch ```submit``` event, and ```new FormData(formElement)``` case too, which won't submit a form. Also, I received a feedback that an event name should be a verb and ```formdata``` isn't appropriate.   Should it be ```constructFormData``` event?

If we dispatch the event in "construct the form data set" algorithm, event order would be:

Interactive form submission case:
1. ```invalid``` if the form is invalid
2. ```submit```
3. The event for this feature

Applications can cancel the form submission by ```preventDefault()``` for ```submit``` event.

```formElement.submit()``` case:
1. The event for this feature

```new FormData(formElement)``` case:
1. The event for this feature




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/187#issuecomment-377117199

Received on Thursday, 29 March 2018 04:23:36 UTC