A placeholder for a dynamic expression in an HTML template.
There are two built-in part types: AttributePart and NodePart. NodeParts
always represent a single dynamic expression, while AttributeParts may
represent as many expressions are contained in the attribute.
A Template's parts are mutable, so parts can be replaced or modified
(possibly to implement different template semantics). The contract is that
parts can only be replaced, not removed, added or reordered, and parts must
always consume the correct number of values in their update() method.
TODO(justinfagnani): That requirement is a little fragile. A
TemplateInstance could instead be more careful about which values it gives
to Part.update().
A placeholder for a dynamic expression in an HTML template.
There are two built-in part types: AttributePart and NodePart. NodeParts always represent a single dynamic expression, while AttributeParts may represent as many expressions are contained in the attribute.
A Template's parts are mutable, so parts can be replaced or modified (possibly to implement different template semantics). The contract is that parts can only be replaced, not removed, added or reordered, and parts must always consume the correct number of values in their
update()
method.TODO(justinfagnani): That requirement is a little fragile. A TemplateInstance could instead be more careful about which values it gives to Part.update().