We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b801a1 commit 73113b2Copy full SHA for 73113b2
2 files changed
example/index.tsx
@@ -32,7 +32,7 @@ www.use(
32
jsxRenderer(
33
({ children }) => {
34
return (
35
- <html hx-ext="chunked-transfer">
+ <html hx-ext={["debug", "chunked-transfer"].join(", ")}>
36
<head>
37
<meta
38
name="viewport"
index.ts
@@ -17,6 +17,11 @@ import type { HtmxExtension } from "htmx.org";
17
if (name === "htmx:beforeRequest") {
18
const xhr = evt.detail.xhr as XMLHttpRequest;
19
xhr.onprogress = function () {
20
+ const is_chunked =
21
+ xhr.getResponseHeader("Transfer-Encoding") === "chunked";
22
+
23
+ if (!is_chunked) return;
24
25
let response = xhr.response as string;
26
27
api.withExtensions(elt, function (extension) {
0 commit comments