I have a keyboard handler in body
<body _="on keypress fetch `/kbd/${event.key}` with method:'POST'">
...
To send keystrokes to backend, but the backend just accepts it without sending anything back (this is a simple game, the actual contents is polled elsewhere).
my console says
_hyperscript.min.js:19 fetch failed: 204 No Content (/kbd/d)
_hyperscript.min.js:19 Error: fetch failed: 204 No Content (/kbd/d)
at _hyperscript.min.js:19:54868
(version 0.9.91)
The docs say "fetch throws on non-2xx responses (404, 500, etc.)," so I expect this should not throw.
I have a keyboard handler in body
To send keystrokes to backend, but the backend just accepts it without sending anything back (this is a simple game, the actual contents is polled elsewhere).
my console says
(version 0.9.91)
The docs say "fetch throws on non-2xx responses (404, 500, etc.)," so I expect this should not throw.