Revision code

Changes Version 0.54.0
Released on March 15, 2018 with 6 commits

Passive updates

  • [up-hungry] elements will now also be updated when the server responds with an error code. This helps when [up-hungry] is used to display error messages.

Forms

  • When a form is submitted you can now consistently refer to that form element as & in CSS selectors (like in Sass).

    E.g. to reveal the first error message within a failed form submission:

    <form id="my-form" up-target=".page" up-fail-reveal="& .error">
      ...
    </form>
    

    In this case & .error will be replaced with #my-form .error before submission.

    This affects CSS selectors in the following HTML attributes:

    • form[up-target]
    • form[up-fail-target]
    • form[up-reveal]
    • form[up-fail-reveal]

Linking to fragments

  • When a link is followed you can now consistently refer to that link element as & in CSS selectors (like in Sass).

    This affects CSS selectors in the following HTML attributes:

    • a[up-target]
    • a[up-fail-target]
    • a[up-reveal]
    • a[up-fail-reveal]

Fragment update API

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.