Skip to content

v1.2.0

Latest

Choose a tag to compare

@croxton croxton released this 24 Oct 15:02

⚠️ Breaking changes

  • Components no longer need to call mount() in the constructor.
  • The event loading strategy now listens for custom events on window instead of document.body. You may need to update your code to dispatch events that trigger component loading to window, e.g. change document.body.dispatchEvent(new CustomEvent('myCustomEvent')) to window.dispatchEvent(new CustomEvent('myCustomEvent'));

Added

  • Added beforeUnmount() lifecycle support for cleanup that must happen before a component is removed from the DOM (e.g. removing video buffers).
  • Added a booster:detached event that loading strategies can use to perform cleanup routines.
  • Added a helper function js() for lazy loading JavaScript files (for non-module scripts that can’t be statically imported).
  • Added support for htmx 2.0.5+ history restore behaviour while retaining backwards compatibility.

Fixed

  • Prevented unresolved loading strategies from leaking memory.
  • Fixed history restores for conductors when using htmx 2.0.5+.
  • Fixed lifecycle cleanup edge cases when elements are swapped or removed.
  • Components loaded via custom events are now triggered only once.