Revision code

Changes Version 3.1.0
Released on May 04, 2023 with 21 commits

Changes

This release addresses some issues when upgrading from Unpoly 2 to 3:

  • Fix a bug where kept [up-keep] elements would call their destructors if the <body> element is swapped
  • Validation now throw an exception if a validation target cannot be matched (fixes #476)
  • Fix a bug where focused date inputs would trigger a validation when destroyed
  • Cache revalidation is now only the default when navigating. If you render cached content without navigating, you must opt into cache revalidation with { cache: 'auto', revalidate: 'auto' }.

If also fixes some bugs in unpoly-migrate.js:

  • Fix a bug where the deprecated origin shorthand (&) in attribute selector values that contain both square brackets and ampersands (fixes #478)
  • Fix a bug where up.$on() was not polyfilled properly
  • Fix a bug where up.$off() was not polyfilled properly
  • Fix a bug where up.$compiler() was not polyfilled properly
  • Fix a bug where up.$macro() was not polyfilled properly

Finally this release publishes a small feature:

  • Published a new attribute [up-href]. Using this attribute you can make any element behave like a hyperlink when clicked.

Upgrading

If you're upgrading from an older Unpoly version you should load unpoly-migrate.js to polyfill deprecated APIs. Changes handled by unpoly-migrate.js are not considered breaking changes.

See our upgrading guide for details.