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

@tkent-google `this.internals_.setFormValue(this.getAttribute('name'), new FormData());` works but `this.internals_.setFormValue(new FormData());` does not. It creates and empty form data. 

On a side note, I find `setFormValue('foo', new FormData())` inconsistent. We have [`removeItem`](https://developer.mozilla.org/en-US/docs/Web/API/Storage/removeItem) in `localStorage` which does not require developers to understand this fine detail. Setting `undefined` is not clearing it. Even FormData has [delete](https://developer.mozilla.org/en-US/docs/Web/API/FormData/delete). `setFormValue` is used with a string in most cases. Having an empty `FormData` is confusing.

-- 
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-452726072

Received on Wednesday, 9 January 2019 14:59:34 UTC