Description
What problem does this feature solve?
The decision to merge the vnode structure together in Vue 3 render functions has become kind of a pain in the butt for me, because it takes away the ability to explicitly specify a prop as an attribute that should show in the DOM.
https://v3.vuejs.org/guide/migration/render-function-api.html#_3-x-syntax-3
It is necessary in many cases for attributes to be shown in the DOM structure for styling and querying purposes, and not just be set as html element properties that are invisible to DOM querying.
If I'm using Vue on top of web components (window.customElements), it's ultimately up to whether or not that component has the prop defined on the HTML element instance, which means properties like "id", "name" don't show up in the DOM because of this line:
How are we supposed to force something to be set as an attribute instead of a property on an HTML element in Vue 3?
What does the proposed API look like?
I'm not sure how the current decision to merge the definition together in render functions can be fixed to force properties to be added as HTML attributes. If there already is a capability to do this in Vue 3, I totally missed it. The only thing I can think of is have a app.config setting that's a map of HTML element names to properties that should always be attributes and reference that in the render function implementation.