diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index 0f231335d5..44bd526dd0 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -2666,10 +2666,43 @@ export const PropertyEffects = dedupingMixin(superClass => { // -- binding ---------------------------------------------- + /* + * Overview of binding flow: + * + * During finalization (`instanceBinding==false`, `wasPreBound==false`): + * `_bindTemplate(false)` called directly during finalization - parses the + * template (for the first time), and then assigns that _prototypical_ + * template info to `__preboundTemplateInfo` _on the prototype_; note in + * this case `wasPreBound` is false; this is the first time we're binding + * it, thus we create accessors. + * + * During first stamping (`instanceBinding==true`, `wasPreBound==true`): + * `_stampTemplate` calls `_bindTemplate(true)`: the `templateInfo` + * returned matches the prebound one, and so this is `wasPreBound == true` + * state; thus we _skip_ creating accessors, but _do_ create a + * sub-instance of the template info to serve as the start of our linked + * list (needs to be an instance, not the prototypical one, so that we can + * add `nodeList` to it to contain the `nodeInfo`-ordered list of instance + * nodes for bindings, and so we can chain runtime-stamped template infos + * off of it). At this point, the call to `_stampTemplate` calls + * `applyTemplateInfo` for each nested `