Skip to content

Commit

Permalink
add morphdom swap
Browse files Browse the repository at this point in the history
  • Loading branch information
edcohen08 committed Jul 25, 2023
1 parent 9a0fbf7 commit 5da1755
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ htmx.defineExtension("get-timezone", {
if (import.meta.hot) {
import.meta.hot.on("template-hmr", () => {
const dest = document.location.href;
//TODO: Make swap morphdom based
htmx.ajax("GET", dest, { target: "body" });
htmx.ajax("GET", dest, { target: "body", swap: "morphdom" });
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{% endblock extra_head %}
</head>
<body hx-boost="true"
hx-ext="get-csrf,get-timezone"
hx-ext="get-csrf,get-timezone,morphdom-swap"
class="{% block bodyclass %}{% endblock bodyclass %}">
{% include "header/base.jinja" %}
<div id="app">
Expand Down

0 comments on commit 5da1755

Please sign in to comment.