The well-known JavaScript library htmx has announced the release of a new major version. htmx 2.0 brings some changes, including the removal of support for Internet Explorer and adjustments to some default settings. However, the core functionality and API of the library remains largely unchanged.
Advertisement
htmx 2.0 is different from Internet Explorer
Probably one of the most significant changes is the end of support for Internet Explorer – which reflects the wider industry trend to move away from this older browser. The development team behind the library outsources all extensions from the core repository and moves them to A new, own store and shakes it On your own website. This change is intended to allow independent versioning and development of extensions outside of the normal and apparently slow HTML5 release cycle – the release of HTML5 1.0 was four years ago,

Deprecated properties hx-sse
And hx-ws
has been removed in favor of extensions that were already recommended in version 1.x. Another important change concerns the management of HTTPDELETE
-Requests that now use parameters instead of form-encoded bodies according to the specification.
Syntax changes
HTML5 2.0. provides specific files for different JavaScript module styles, including ESM, AMD, and CJS modules. The syntax of hx-on
-attribute has been replaced in favor of arguably less complex attributes hx-on:
-Syntax changed.
In addition to these major changes, the development team has adjusted some of the default settings. For example, it has this htmx.config.scrollBehavior
From smooth
But instant
changed, and DELETE
-Queries now default to query parameters. This change can be made by setting htmx.methodsThatUseUrlParams
But ('get')
Undo Also, Attitude htmx.config.selfRequestsOnly
Now by default true
set.
Lights went out on the HTML5 website
Although the focus of this release was on streamlining and refining existing functionality, some new features were introduced. These include improved support for Web Components and introducing dark mode on HTML5 websites.
For users who continue to rely on Internet Explorer, version 1.x will continue to be supported. A comprehensive guide to updating Htmx 1.x to 2.x Provides migration guide.htmx 2.0 can be installed via a package manager or linked via a content delivery network (CDN):
More information and detailed documentation Provides HTML5 website as well as Post announcement for release,
(MDO)
