You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
In contrast TemplateElement.bind returns a TemplateIterator. It does not have any of those properties. Indeed, it cannot, as the same instance is shared by if/bind/repeat. (Is that for performance reasons?).
A few issues here:
what APIs are expected from Node.bindings?
should there be a NodeBinding that is created seperately for if/bind/repeat and points at the TemplateIterator? It could implement NodeBinding correctly.
alternatively, if it we must reuse TemplateIterator for performance, should I be able to use a type test to distinguish the two types of bindings? Currently NodeBinding and TemplateIterator names are both private (although the members are public via .bindings)
what is public API on TemplateIterator? Many of the methods/properties don't look public (you could violate the class invariants by calling methods at unexpected times.) Here's my guess on the public surface area... based on what would be useful reflection:
hasRepeat/hasBind/hasIf
repeatModel/bindModel/ifModel
repeatPath/bindPath/ifPath
close()/closed
The text was updated successfully, but these errors were encountered:
// Normally calling .close will only close that binding.// However this will close the TemplateIterator, including the "bind" and "repeat"template.bindings['if'].close();
Not sure if this is a bug, or an intentional design tradeoff, but:
The NodeBinding type, typically accessible via Node.bindings has various APIs such as:
In contrast TemplateElement.bind returns a TemplateIterator. It does not have any of those properties. Indeed, it cannot, as the same instance is shared by if/bind/repeat. (Is that for performance reasons?).
A few issues here:
The text was updated successfully, but these errors were encountered: