ember-polyfills / ember-angle-bracket-invocation-polyfill

MIT License
76 stars 33 forks source link

LinkTo and Input don't support arbitrary attributes in <3.10 #120

Open elwayman02 opened 4 years ago

elwayman02 commented 4 years ago

The built-in LinkTo component provided by this polyfill doesn't pass through arbitrary attributes. For example:

<LinkTo @route='/' data-some-attribute>Index</LinkTo>

renders as

<a href="/">Index</a>

but should be

<a href="/" data-some-attribute="">Index</a>

The polyfill rewrites LinkTo to curly invocation but doesn't put the arbitrary attributes anyway.

The same thing is true for <Input>. Both of these built-ins allow arbitrary attributes in 3.10+, but the polyfill did not maintain that support.

To solve this, we need a similar approach to the Component runtime polyfill (that runs for <2.12).