Netflix / x-element

A dead simple starting point for custom elements.
Apache License 2.0
29 stars 12 forks source link

Discussion: Should we allow a “Node” as content. #207

Open theengineear opened 2 days ago

theengineear commented 2 days ago

Current

const container = document.createElement('div');
const input = document.createElement('input');
render(container, html`${input}`);
// <div>[object HTMLInputElement]</div>

We could handle Nodes in a special manner where we just bind the live value directly as content. We would also want to consider whether a Node would be allowed as a value of an array.

Pros

Cons