Conversation
Deploying api with
|
| Latest commit: |
a11afa3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://654707a6.charming-a13.pages.dev |
| Branch Preview URL: | https://template-api.charming-a13.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the DOM construction API from the previous function-based html/svg(tag, options) approach to a template-literal based API (e.g. svg/html as template tags), and updates tests/snapshots accordingly.
Changes:
- Replaces the old
tag(ns)(name, options)builder with a template-tag driven parser/hydrator (src/dom/tag.js), and updateshtml/svgto parse markup strings. - Updates snapshot generators and event tests to use the new template API.
- Regenerates stored snapshot output files to reflect the new rendering behavior (e.g.,
<tbody>insertion, wrapper roots).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/dom/tag.js |
Implements the new template-tag hydration/append logic for attributes, data-driven cloning, and child insertion. |
src/dom/svg.js |
Switches svg to a template tag that parses via innerHTML in an SVG <g> container. |
src/dom/html.js |
Switches html to a template tag that parses via innerHTML in an HTML <div> container. |
src/dom/index.js |
Removes the public re-export of tag from the DOM entrypoint. |
test/snapshots.js |
Rewrites snapshot fixture generators to use the template API. |
test/snapshot.spec.js |
Adds whitespace normalization before snapshot comparison. |
test/event.spec.js |
Updates event tests to use the template API. |
test/output/*.html |
Updates expected snapshot outputs for the new renderer behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.