-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
For a template like:
<span>{{count}}</span>can-view-live listens to the parent node, span (for legacy reasons, jQuery ignored textNodes) but technically the binding appears in span.firstChild.
This means, if you want to debug the template, you have to pass in the parent node, like:
debug.logWhatChangesMe(spanElement); // current behavior, intuitive I think?Should we make it so you have to do this instead?
debug.logWhatChangesMe(spanElement.firstChild); // technically correctIf that's true, what happens with templates that have no parent node? E.g:
var frag = stache("{{foo}}");Currently, can-view-live listens on the document fragment, so you'd have to do something like this to debug it:
var frag = stache("{{foo}}")
// this does not work currently, because DocumentFragment
// does not implement the `can.getValueDependencies` symbol
debug.logWhatChangesMe(frag);Note: it's also possible to have lists without parent node (other than the document fragment itself)
{{#if foo}} {{#each items}} {{ this }} {{/each}} {{/if}}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels