Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Live Binding ejs with can.observe does not update

$
0
0
It's not intentional, but expected. There's not a great way to fix this either. 


can.view('dummyEJS'{
        personperson
    })


That returns an already-live documentFragment.  jQuery is doing some magic to clone that documentFragment when it inserts it multiple times.  Unfortunately, I can't think of a way to tell CanJS's live binding system that jQuery cloned an already live-bound elements. 

$els.clone(true, true) won't help because the events arem't on the element, they are on Observes that point to specific elements.  We'd somehow have to tell the live-binding system to update multiple elements when there was just one.

It maaaaybe possible to hack this into jQuery ... but hacking it into the other libraries is probably a non-starter.


Why would you update multiple items with the same live-bound HTML?

Viewing all articles
Browse latest Browse all 3491

Trending Articles