Skip to content

[html] Unable to use a <template> element in html template #1967

@trusktr

Description

@trusktr

Describe the bug

This causes an error:

import html from 'solid-js/html' 

html`
  <div>
    <template>
      <h1>Example</h1>
    </template>
  </div>
`

Error:

Uncaught TypeError: Cannot read properties of null (reading 'firstChild')

Your Example Website or App

https://playground.solidjs.com/anonymous/5dd52803-e570-4f6e-a72d-0ef56944996f

Steps to Reproduce the Bug or Issue

see console

Expected behavior

expect to use a <template> element like normal HTML

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 1.8.5

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions