Repository navigation
Add the innerHTML setter over @bomb.sh/html - #159
Open
natemoo-re wants to merge 1 commit into
Open
natemoo-re wants to merge 1 commit into
natemoo-re wants to merge 1 commit into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
6 of 12 tasks
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.
What does this PR do?
Adds the
Element#innerHTMLsetter, parsing with@bomb.sh/html'sparseFragmentfrom@bomb.sh/html/sinkthrough aTreeSinkthat builds@clack/uinodes. Every framework profile inframeworks.tslistsElement#innerHTML, and Solid and Svelte also use it to clone templates.localName, namespace,inForm, andhtmlIntegrationPointfor MathMLannotation-xml.@bomb.sh/html's fast path turns on by itself for HTML contexts that parse with plain "in body" rules.static {}pattern asexposeAttributes), and attributes are added asAttrnodes. This way, names the parser produces, such as<foo:bar a:b>, aren't split or rejected bycreateElementNS/setAttributeNSvalidation.NotSupportedError):innerHTMLon atemplate, or markup containing onequirksModeisn't passed, because@clack/uidoesn't track a document mode.@bomb.sh/html0.1.0 has no serializer.WPT now also selects the setter cases this unlocks:
domparsing/innerhtml-04,-07,-08html/syntax/parsing:named-character-references(a file of about 2,000 subtests),cdata-in-integration-point-fragment,adoption_agency_check_the_end_tag_name, and thezero.htmlcases that don't readtitleinnerHTMLcases inDocument-getElementByIdactive-element,focusing-focused-noopI checked each newly selected case by running it with the setter disabled: every one fails without the setter and passes with it.
Notes for review:
pnpm-workspace.yamlgets the sameminimumReleaseAgeExcludeentry for@bomb.sh/html@0.1.0as the in-progress WPT harness migration from parse5, so whichever lands second has a one-line conflict.insertBeforeand notify on each one, because the render replay depends on those dirty marks. Batching notifications for a detached fragment would be a separate perf change.Type of change
Checklist
pnpm test)pnpm format)AI-generated code disclosure