htmx-ext-restored

2.0.0 • Public • Published

This extension triggers an event restored whenever a back button even is detected while using hx-boost.

Install

<script src="https://unpkg.com/htmx-ext-restored@2.0.0/restored.js"></script>

Usage

A page utilizing hx-boost that will reload the h1 each time the back button is pressed:

<body hx-boost="true">
    <h1 hx-ext="restored" hx-trigger="restored" hx-get="/header">Come back!</h1>
    <a href="/other_page">I'll be back</a>
</body>

Readme

Keywords

none

Package Sidebar

Install

npm i htmx-ext-restored

Weekly Downloads

1

Version

2.0.0

License

none

Unpacked Size

2.36 kB

Total Files

4

Last publish

Collaborators

  • carsongross