Skip to content

Questions about HTMLTemplateElement.content getter #11953

@AtkinsSJ

Description

@AtkinsSJ

What is the issue with the HTML Standard?

From the spec:

The content getter steps are to return template's template contents, if the template contents is not a ShadowRoot node; otherwise null.

Implementing this in Ladybird has no apparent effect on WPT test results, which raises a few questions to me:

  1. How would one produce a template element with a ShadowRoot as the template contents?
  2. Is it actually possible to do so?
  3. The IDL defines it as readonly attribute DocumentFragment content; - this suggests it is not nullable and should always return a value, which conflicts with this algorithm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions