I just pushed a quick update to inline-form which makes the code even shorter.

One of the things I’ve realized as I do this project is the wealth of tooling in browsers for handling forms that we’ve left behind by moving to POSTing everything in JSON via JavaScript. For example it turns out the browser’s fetch function understands different body types and will automatically add in the correct Content-Type header based on the body type, so posting Form content can be as simple as:

fetch(formElement.action, {
    method: 'POST',
    body: new FormData(formElement),