Netflix / Netflix/x-element

Default template engine won't stamp elements unless they implement a blank template

Open
#152 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Leaving a note here to investigate; will update with repro/more context if needed:

static template(html) {
  return () => html``;
}

Without this included in my element I was not able to see children added using host.shadowRoot.appendChild in the DOM

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the custom element behavior shown in the issue, comparing elements with and without the blank static template method. Inspect the resulting shadow DOM after host.shadowRoot.appendChild; done means appended children appear without requiring that method.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.