HTML forms on performance-enhancing drugs
May happen in some instances since the ajax-form.js file lis loaded before the <template>
is rendered. Ran across this while working on a Web Component integration library/loader for React.
Error I saw was:
Uncaught TypeError: Cannot read property 'content' of undefined
at HTMLFormElement.value (ajax-form.js:476)
at ajax-form.js:469
at ajax-form.js:500
Fixed in 801d1901738a88dd9070ec200f617d7a61ec3ed4.
Thanks to @rajsite for discovering the issue and @flaiker for verifying the fix. See #73 and #78 for details.
This was accidentally removed from a previous version. See #75 for details.
You no longer have to pull in the full webcomponents.js polyfill for browsers that do not implement the web components spec. As of 2.1.0, ajax-form no longer utilizes Shadow DOM, making this possible.
See #66 for more details.
Please see #65 for details.
You can grab the latest ajax-form on npm.
This is a huge release with some substantial changes, though the breaking changes noticeable to users are likely very minimal.
method
attribute was not included, an Error
was thrown. 2.0 is taking a different approach to make ajax-form seem a bit more native. If you don't include a method
attribute in your form, a default of "GET" will be used.name
attribute will all be included in the submit request for all enctype
s, even "application/json"!To download ajax-form, simply npm install ajax-form
.
PATCH is now a supported method. Thanks to @gmercey for the pull request (#53).
1.5.0 brought a regression that prevented custom headers, specified via the headers
attribute, from being sent with the request. This is fixed here in 1.5.1. See #49 for more details.
As always, you can access the latest version via bower.