Skip to content

Allow interpolating tag names#54

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

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

Conversation

@yurivish

@yurivish yurivish commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

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.

@mbostock mbostock mentioned this pull request May 20, 2026
Merged
9 tasks
@mbostock

Copy link
Copy Markdown
Member

Merged into #55. Thank you!

@mbostock mbostock closed this May 20, 2026
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.

2 participants