Created attachment 299053 [details] template-part.js Posting here since there is no other place to do this with a proper licensing.
WebIDL: callback TemplateProcessor = void (TemplateInstance instance, sequence<TemplatePart> parts, any parameters); interface TemplatePart { stringier attribute DOMString value; readonly attribute DOMString expression; } interface AttributeTemplatePart : TemplatePart { } interface NodeTemplatePart : TemplatePart { void replace(sequence<Node>); void replaceHTML(DOMString html); } partial interface HTMLTemplateElement { TemplateInstance createInstance(any parameters, optional TemplateProcessor processor); } interface TemplateInstance : DocumentFragment { void update(any parameters); }
Created attachment 465386 [details] DOM parts