-
Notifications
You must be signed in to change notification settings - Fork 39
Does not work for Extended <file-input> #51
Comments
As long as your element exposes an input element with a type attribute of "file", there should be no issue. Otherwise, I'm not sure how you would identify such an element. |
Have tested this myself using an element which works in a native form. |
Ajax-form checks for a file-input element, or any input element that has an attribute of type=file. Short of this, I'm not sure how you would identify such an element, short of some very specific convention. What is your specific plan to address this? |
Well, it is a 'very specific convention' itself to check specifically for I say this because it defies user expectations to be disallowed from wrapping or extending due to an overly specific parsing implementation. |
Yes, that particular convention is in place as I am also the developer of file-input. I suppose that convention could be removed and the custom element parser could be augmented to check for the |
Ok cool. That's what I was doing for the pull request. Glad you get my point :) |
Yep, as long as an additional specific convention is not introduced, that should be fine. I'd suggest removing the file-input specific code while you're at it. |
Also, curious what your element's code looks like. I've done quite a bit of work with the File API, scaling, previewing images, etc. |
I'll be putting what I have so far up on webcomponents.io soon. Hadn't seen your link before, looks cool. |
Released as part of 1.5.4. |
I was building an extension of which parses and displays a file preview for each valid file. This does not work in the current implementation of
<ajax-form>
since themaybeParseFileInput
function checks the tag name explicitly. This also means that<ajax-form>
does not work with any alternate web component implementations of a file input.I'm working on a pull request to fix this.
The text was updated successfully, but these errors were encountered: