Skip to content

Allow interpolating tag names#54

Open
yurivish wants to merge 1 commit into
observablehq:mainfrom
yurivish:yurivish/tag-name
Open

Allow interpolating tag names#54
yurivish wants to merge 1 commit into
observablehq:mainfrom
yurivish:yurivish/tag-name

Conversation

@yurivish
Copy link
Copy Markdown

@yurivish yurivish commented Mar 19, 2026

This PR permits the following interpolation:

html`<${tag}></${tag}>`

This is helpful for dynamic custom element redefinition (you cannot redefine custom elements, but you can version by tag name, and this change allows using that pattern much more easily in Observable notebooks).

This is a proof of concept. If there's interest in getting this merged I can verify that the change is spec-compliant and add tests; I think I asked about this a few years ago and it wasn't in scope at the time.

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.

1 participant