Change8

Migrating to HTMX v2.0.5

Version v2.0.5 introduces 4 breaking changes. This guide details how to update your code.

Released: 6/20/2025

4
Breaking Changes
4
Migration Steps
6
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

writeTitlegetRespCodeTargethistoryRestoreAsHxRequestrequestLockwindow.locationsubstr

Breaking Changes

Issue #1

Removed legacy Internet Explorer support – pages will no longer work in IE; upgrade to a modern browser or provide a polyfill.

Issue #2

Title text is now written using innerText instead of innerHTML – if your code relied on HTML markup in the title, update it to set the desired markup after the title is set or use a custom script.

Issue #3

Internal usage of the deprecated String.substr method was removed – replace any custom code that calls substr with slice or substring.

Issue #4

Submit buttons with formmethod=dialog now perform a no‑op instead of submitting – adjust forms that relied on the previous behavior.

Migration Steps

  1. 1
    Test your site in a modern browser after IE support removal; add polyfills if IE compatibility is required.
  2. 2
    If you set document.title with HTML markup, change the code to set title.textContent (or innerText) and apply any needed markup separately.
  3. 3
    Search your codebase for .substr calls and replace them with .slice or .substring.
  4. 4
    Review forms that use formmethod=dialog; ensure they no longer expect a submit action.

Release Summary

The release adds new hx-drag and historyRestoreAsHxRequest features, expands documentation and examples, removes legacy IE support, and includes numerous bug fixes and documentation improvements.

Need More Details?

View the full release notes and all changes for HTMX v2.0.5.

View Full Changelog