Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gitaaron/backbone_cascading
https://github.com/gitaaron/backbone_cascading
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gitaaron/backbone_cascading
- Owner: gitaaron
- Created: 2013-06-13T18:59:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-17T19:16:54.000Z (over 11 years ago)
- Last Synced: 2024-04-14T15:04:43.362Z (9 months ago)
- Language: JavaScript
- Size: 621 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The point of this project is to illustrate how to implement a postRender hook in a Backbone application.
A typical Backbone application will have many cascading views with parents and children.
ie/
Root
-> ChildOfRoot
-> ChildOfChildOfRoot
-> ChildOfChildOfChildOfRootA common problem is that after calling render on the leaf child view it will have no way of knowing when it has been added to the DOM. This is necessary for certain independent third party libraries such as a wysiwyg because the third party library will only take an 'ID' attribute as a parameter and do the DOM selection by itself.
The solution is to notify each child view once it has been added via a centralized mechanism (common base backbone view).