Intent to Ship: Form-associated custom elements

167 views
Skip to first unread message

TAMURA, Kent

unread,
May 16, 2019, 7:55:09 PM5/16/19
to blink-dev
tk...@chromium.org https://docs.google.com/document/d/1JO8puctCSpW-ZYGU8lF-h4FWRIDQNDVexzHoOQ2iQmY/edit?usp=sharing#heading=h.2hgix04sc53t  

https://html.spec.whatwg.org/C/custom-elements.html#form-associated-custom-element

https://html.spec.whatwg.org/C/custom-elements.html#the-elementinternals-interface

https://dom.spec.whatwg.org/#dom-element-attachshadow


API change summary: https://github.com/w3c/webcomponents/issues/187#issuecomment-467314213


TAG review: https://github.com/w3ctag/design-reviews/issues/305

No feedback about form-associated custom elements.

Form-associated custom elements enable web authors to define and create custom elements which participate in form submission. https://groups.google.com/a/chromium.org/d/msg/blink-dev/HW8j_JLLiPo/V_SmVZkwBgAJ
There is no compatibility risk as this is a new, additive feature.

Interoperability: although the specification work has been done by Chrome engineers, all vendors have been seeking a solution in this problem space for some time. Other vendors have been supportive of this direction, and got an in-depth overview of the API in the 2019-04-25 web components F2F. Signals in the room were positive, with some questions about future extensions and performance.
Firefox: No public signals (https://github.com/mozilla/standards-positions/issues/150). @annevk actively participated in API discussion and helped specification review. Firefox developers have never been commented on the proposed API AFAIK. Edge: No public signals Safari: Public support at the web components F2F from Apple engineers.
Web developers: Strongly positive (https://www.w3.org/2019/04/25-components-irc#T20-38-19)
Yes

Almost yes

https://wpt.fyi/results/custom-elements/HTMLElement-attachInternals.html

https://wpt.fyi/results/custom-elements/form-associated

https://wpt.fyi/results/shadow-dom/Element-interface-attachShadow-custom-element.html


Form validation UI behavior and "formStateRestoreCallback" are not testable in WPT because they are implementation-dependent.

https://bugs.chromium.org/p/chromium/issues/detail?id=905922 https://chromestatus.com/features/4708990554472448

--
TAMURA Kent
Software Engineer, Google


Anne van Kesteren

unread,
May 17, 2019, 4:11:07 AM5/17/19
to TAMURA, Kent, blink-dev
On Fri, May 17, 2019 at 1:55 AM TAMURA, Kent <tk...@chromium.org> wrote:
> Firefox: No public signals (https://github.com/mozilla/standards-positions/issues/150).

FWIW, Firefox is supportive and plans to implement in due course.

Dominic Battré

unread,
May 17, 2019, 5:20:11 AM5/17/19
to blink-dev, tk...@chromium.org
Hi.
Have you thought about the implications of address/credit card/password auto filling already? It's currently not clear to me whether we can find a good solution. See crbug.com/964185.

Best regards,
Dominic

TAMURA, Kent

unread,
May 17, 2019, 5:37:53 AM5/17/19
to Dominic Battré, blink-dev
Yes, I think it's possible to support autofill for form-associated custom elements.  It's not implemented yet, but I think it's ok to ship form-associated custom elements without autofill support, and add it later.  I guess form-associated custom elements won't be used widely until other browsers support it.


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/eabdbc5b-77a6-4c27-ab0b-dc308bcffc9d%40chromium.org.

Alex Russell

unread,
May 23, 2019, 3:21:22 PM5/23/19
to blink-dev, bat...@chromium.org
LGTM1!!!!


On Friday, May 17, 2019 at 2:37:53 AM UTC-7, Kent Tamura wrote:
Yes, I think it's possible to support autofill for form-associated custom elements.  It's not implemented yet, but I think it's ok to ship form-associated custom elements without autofill support, and add it later.  I guess form-associated custom elements won't be used widely until other browsers support it.


On Fri, May 17, 2019 at 6:20 PM Dominic Battré <bat...@chromium.org> wrote:
Hi.

On Friday, May 17, 2019 at 10:11:07 AM UTC+2, Anne van Kesteren wrote:
On Fri, May 17, 2019 at 1:55 AM TAMURA, Kent <tk...@chromium.org> wrote:
> Firefox: No public signals (https://github.com/mozilla/standards-positions/issues/150).

FWIW, Firefox is supportive and plans to implement in due course.

Have you thought about the implications of address/credit card/password auto filling already? It's currently not clear to me whether we can find a good solution. See crbug.com/964185.

Best regards,
Dominic

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.

Chris Harrelson

unread,
May 23, 2019, 3:25:46 PM5/23/19
to Alex Russell, blink-dev, Dominic Battre
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6b64e28c-e577-4430-90b9-4bd2430ef484%40chromium.org.

oj...@google.com

unread,
May 23, 2019, 3:27:12 PM5/23/19
to blink-dev, sligh...@google.com, bat...@chromium.org
LGTM3, but it looks like TAG is discussing again this week. Let's make sure to followup in case there are any significant or breaking changes suggested.
LGTM2

TAMURA, Kent

unread,
May 30, 2019, 9:55:06 PM5/30/19
to Ojan Vafai, blink-dev, Alex Russell, Dominic Battré
On Fri, May 24, 2019 at 4:27 AM ojan via blink-dev <blin...@chromium.org> wrote:
LGTM3, but it looks like TAG is discussing again this week. Let's make sure to followup in case there are any significant or breaking changes suggested.

I asked the outcome of the discussion, but no feedback yet.
I'll enable the feature after M76 branch to make time to follow incoming TAG feedback.
 
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6ed913a8-429c-4e91-aacd-45a8dd012177%40chromium.org.

Martin Šrámek

unread,
Jun 2, 2019, 12:19:52 PM6/2/19
to TAMURA, Kent, Ojan Vafai, blink-dev, Alex Russell, Dominic Battré
Filling data into form elements in situations when it may not be obvious to the user has privacy implications. Once you start looking into that, please ask for a privacy review (e.g. via the Chrome internal launch process). Thanks!

Daniel Bratell

unread,
Jun 3, 2019, 6:03:51 AM6/3/19
to TAMURA, Kent, Martin Šrámek, Ojan Vafai, blink-dev, Alex Russell, Dominic Battré
Form submits have always contained hidden data. That is the whole idea behind <input type=hidden>.

Example: Look at the url when doing a Google search. The google search page has added a lot of hidden fields, including your physical location in a gs_l parameter.

So if hidden form fields is a problem, that ship sailed in ~1994, and if including privacy sensitive data in hidden form fields is a problem, you'll have to fight Google about it.

/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABB%3D4Sc%3D5VC%2BGu8LhSahNgC%2BzBHG0u7r-euj_yZUxPRzDNE_xA%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CEST (UTC+2) */

TAMURA, Kent

unread,
Jun 7, 2019, 1:30:54 AM6/7/19
to Martin Šrámek, blink-dev
I don't think this API has privacy implications, but I asked privacy review just in case.

Reply all
Reply to author
Forward
0 new messages