What problem are you trying to solve?
Making it easier to serve HTML content directly from a service worker.
What solutions exist today?
This is actually quite easy:
new Response(html, { headers: { "Content-Type": "text/html" } })
However not very discoverable and doesn't feel "encouraged".
How would you solve it?
Response.html(html_string), kind of like Response.json(jsonable_object), can perform the same as the existing solution, but in an ergonomic/"encouraged" way.
Anything else?
No response
What problem are you trying to solve?
Making it easier to serve HTML content directly from a service worker.
What solutions exist today?
This is actually quite easy:
However not very discoverable and doesn't feel "encouraged".
How would you solve it?
Response.html(html_string), kind of likeResponse.json(jsonable_object), can perform the same as the existing solution, but in an ergonomic/"encouraged" way.Anything else?
No response