Is there a custom element, which allow the use of RFC6570 URI templates? This is very similar to this question. Here's the sample HTML used there.
<form action="/orders/{id}" method="get">
<input type="text" name="id"/>
<input type="submit" value="Submit"/>
</form>
I'm asking specifically about a Web Component though, so something like either
<form is="templated-form">
or
<templated-form>
It's very simple to create if it doesn't exist yet.
Just register a
<template-form>custom element inheriting fromHTMLFormElement.prototype, and extending theformelement, that will make use of your favorite RFC6570 URI templates compliant JavaScript library.For example, this one : https://medialize.github.io/URI.js/uri-template.html, or those ones : https://github.com/medialize/URI.js/#uri-template.
You'll have to use the extended notation in order to take advantage of the semantics of the
<form>element :