Closed jmesserly closed 11 years ago
another small detail, path || ''
appears twice in the code, once in HTMLTemplateElement.prototype.createBinding, and once in TemplateBinding constructor.
Also: I'm not sure why path || ''
is not used for other bindings?
awesome!
I'm not sure if NodeBinding is intended to be public API or not, but it is returned by [Node.prototype.createBinding] and the "bindings" Map on Node. One of its public properties is "NodeBinding.node". For most of the bindings that means exactly what you'd expect (the Node that created the binding). However, for HTMLTemplateElement, the ".node" property is the TemplateIterator. This also means TemplateIterator is now exposed via
querySelector('template').bindings[name].node
... which would let you potentially do bad things like muck with the ".inputs" CompoundBinding or the ".terminators" list, etc.See: https://github.com/Polymer/mdv/blob/master/src/template_element.js#L820