Skip to content

Document async-htm-to-string as an HTM-style rendering option#247

Open
bcomnes wants to merge 1 commit into
fragtmlfrom
docs/async-htm-to-string
Open

Document async-htm-to-string as an HTM-style rendering option#247
bcomnes wants to merge 1 commit into
fragtmlfrom
docs/async-htm-to-string

Conversation

@bcomnes

@bcomnes bcomnes commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Closes #239

DomStack now defaults to fragtml for the bundled/ejected base layout because that path only needs safe string manipulation. This PR documents async-htm-to-string as another good Node-side rendering option for people who prefer the familiar htm tagged-template style, including projects that also use Preact for browser-side components.

This adds a "Using async-htm-to-string for HTM-style string rendering" subsection at the end of the TypeScript Support section covering:

  • How it fits alongside the fragtml default and htm/preact usage
  • Installing async-htm-to-string
  • Differences/gotchas: standard HTML attribute names, awaiting the html tag, and the XSS risk of rawHtml()
  • A short layout example using rawHtml() for trusted inner content

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for using async-htm-to-string as a Preact-free option for server-side HTML rendering in DomStack, addressing #239.

Changes:

  • Documented async-htm-to-string as a string-rendering alternative to htm/preact + preact-render-to-string
  • Included examples and highlighted key behavioral differences and gotchas (attribute naming, await usage, rawHtml() XSS risk)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@coveralls

coveralls commented Apr 18, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 28276669827

Coverage increased (+0.02%) to 92.731%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4265
Covered Lines: 4047
Line Coverage: 94.89%
Relevant Branches: 701
Covered Branches: 558
Branch Coverage: 79.6%
Branches in Coverage %: Yes
Coverage Strength: 74.53 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@bcomnes bcomnes force-pushed the docs/async-htm-to-string branch from 9308a93 to ac75399 Compare June 27, 2026 02:36
@bcomnes bcomnes changed the title Document async-htm-to-string as a Preact-free rendering option Document async-htm-to-string as an HTM-style rendering option Jun 27, 2026
@bcomnes bcomnes changed the base branch from master to fragtml June 27, 2026 02:37
@bcomnes bcomnes force-pushed the docs/async-htm-to-string branch from ac75399 to 9d7d68a Compare June 27, 2026 03:00
@bcomnes bcomnes force-pushed the docs/async-htm-to-string branch from 9d7d68a to 2f5877f Compare June 27, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document async-htm-to-string as a first-class Preact-free templating option

3 participants