💣 Breaking Changes
- This release doesn't contain any expected breaking changes, but as it contains many major internal changes and there is a risk that it introduces bugs, it felt safer to release it with a major version number.
🎨 Features
- Implements
Window.fetch()
,Window.Request
,Window.Response
andWindow.Headers
in Happy DOM, instead of using the "node-fetch" library. The code is based on "node-fetch". This improves the integration for functionality such asFormData
,Blob
,AbortController
andAbortSignal
withWindow.fetch()
. It will also make it possible to add support for ESM while still keeping support for CommonJS. - Adds support for
FormData
. (#585) - Adds support for
AbortController
andAbortSignal
. (#470) - Adds full support for
ValidityState
- Adds support for the :checked pseudo selector to query selector. (#695)
- Changes internal logic to favor
Element.setAttribute()
andElement.removeAttribute()
instead ofElement.setAttributeNS()
andElement.removeAttributeNS()
to improve performance - Adds support for element name and id as property to
HTMLCollection
- Adds support for
HTMLCollection.namedItem()
- Adds support for
HTMLButtonElement.name
- Adds support for
HTMLButtonElement.form
- Adds support for
HTMLButtonElement.checkValidity()
- Adds support for
HTMLFormControlsCollection
- Improves support for
HTMLFormElement.elements
- Adds support for form element name and id as property to
HTMLFormElement
- Adds support for
HTMLFormElement.checkValidity()
. It previously just returned "true". - Adds support for
HTMLFormElement.reportValidity()
. - Adds support for
HTMLFormElement.submit()
. - Adds support for
HTMLFormElement.reset()
. - Adds support for
RadioNodeList
. - Improves support for
HTMLInputElement.checked
- Adds support for
HTMLInputElement.labels
- Improves performance of
HTMLInputElement.form
- Adds support for
HTMLInputElement.checkValidity()
. It previously just returned "true". - Adds support for
HTMLInputElement.reportValidity()
- Adds support triggering a "click" event on
HTMLInputElement
to trigger functionality on checkboxes, radio buttons, submit buttons and reset buttons. - Improves performance of
HTMLLabelElement.form
- Improves support for
HTMLSelectElement.options
- Adds support for
HTMLSelectElement.labels
- Improves support option index properties in
HTMLSelectElement
- Adds support for
HTMLSelectElement.checkValidity()
. - Adds support for
HTMLSelectElement.reportValidity()
- Improves performance of
HTMLSelectElement.form
- Adds support for
HTMLSelectElement.validity
- Adds support for
HTMLInputElement.validity
- Adds support for
HTMLInputElement.reportValidity()
- Adds support for
HTMLButtonElement.form
- Adds support for
HTMLButtonElement.labels
- Adds support for
HTMLButtonElement.validity
- Adds support for
HTMLButtonElement.required
- Adds support for
HTMLButtonElement.validationMessage
- Adds support for
HTMLButtonElement.checkValidity()
- Adds support for
HTMLButtonElement.reportValidity()
- Adds support for
HTMLButtonElement.setCustomValidatiy()
- Adds support for
HTMLTextAreaElement.form
- Adds support for
HTMLTextAreaElement.labels
- Adds support for
HTMLTextAreaElement.validity
- Adds support for
HTMLTextAreaElement.validationMessage
- Adds support for
HTMLTextAreaElement.checkValidity()
- Adds support for
HTMLTextAreaElement.reportValidity()
- Adds support for
HTMLTextAreaElement.setCustomValidatiy()
I know many of you have been waiting for several of the features in this release. It turned out to be much bigger and more time-consuming than originally anticipated, but now it's finally out. Enjoy 🥳