Creé un elemento de entrada HTML personalizado como sigue:
<html> <script> class TestInput extends HTMLElement { constructor() { super(); var shadow = this.attachShadow({mode:'open'}); var cinput = document.createElement('input'); cinput.setAttribute('type', 'text'); cinput.setAttribute('name', 'test'); cinput.setAttribute('value', 'test'); shadow.append(cinput); this.cinput = cinput; } } customElements.define('test-input', TestInput); </script> <body> <form action="/test"> <test-input></test-input> <input type="submit"></input> </form> </body> </html>Sin embargo, cuando usé Spring para recibir los parámetros del formulario, no obtuve nada. ¿Cómo puedo enviar el formulario con el valor de entrada dentro de la raíz oculta?