makePostLink

Given an existing link, create a POST item from it. You can use this to do something like:

auto e = document.requireSelector("a.should-be-post"); // get my link from the dom e.replaceWith(makePostLink(e)); // replace the link with a nice POST form that otherwise does the same thing

It passes all attributes of the link on to the form, though I could be convinced to put some on the submit button instead.

Meta