Version 0.54.0
Released on 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
& .errorwill be replaced with#my-form .errorbefore 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
- New option for
up.replace():{ keep: false }will disable preservation of[up-keep]elements. - New option for
up.replace():{ hungry: false }will disable updates of[up-hungry]elements.