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

Re : Howto: listen for view change event?

$
0
0
Thanks for your responses, guys!

Yes, listening for multiple change events on Map object is not an option since it could cause performance reduce.

I will take a look at the Mutation Observer solution, thanks to pointing me on!

Originally I was thinking about some callback from view object. CanJS view object consists of fragments, which are bound to data change events. So I imagine, every fragment knows if it's updated and notifies its view about. View notifies developer about DOM change via callback or event. If somebody think it could be useful, I will create feature request ticket on CanJs github. So please let me know if you find this useful.

There is also can.view.hook() API method. However I'm not sure how it actually works. Documentation does not say a lot about. also it mentions, in only works for EJS.

Viewing all articles
Browse latest Browse all 3491

Trending Articles