FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
postpostscript
postpostscripthtmlAsync
Remix of postpostscript/html
Public
Like
1
htmlAsync
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

htmlAsync: async fork of @postpostscript/html supporting Promises as replacements

Examples

Create val
import { delay } from "https://deno.land/x/delay@v0.2.0/mod.ts"; import { html, htmlResponseAsync } from "https://esm.town/v/postpostscript/htmlAsync"; export default function(req: Request) { return htmlResponseAsync` ${(async () => { await delay(1000); return `<script>console.log("sanitized")</script>`; })()} ${(async () => { await delay(1000); return html`<script>console.log("unsanitized")</script>`; })()} `; }

Tests: @postpostscript/htmlAsyncTest

Migrated from folder: HTML/htmlAsync

Code
README.mdmain.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.