The tests, while many of them are incomplete, show a rough guideline of how to start using the HtmlInputElement api (this pattern actually works for all element types):
The binding @bhoot suggested would be fine to PR to the repo, actually.
Also note that there is an ongoing effort to replace webapi, due to it’s importance to the ecosystem and my lack of time to work on what is now a very old codebase.