Changes between Initial Version and Version 1 of Ticket #10556, comment 9
- Timestamp:
- Oct 22, 2011, 3:58:14 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10556, comment 9
initial v1 5 5 I have a view called MyView (which is a js object, a wrapper for html elements). I would expose properties like "selected". The MyView will contain a checkbox and other elements. In a typical Ajax application where we manipulate the DOM, an instance of MyView could be in a detached/disconnected state. But we could set the myView.selected = true. This should select the checkbox in the myView instance and because this is programatic changing the checkbox.checked property, we need to dispatch a "change" event. There might be a .live() or .delegate() listening to these "change" events and updating the model. How does the "non-disconnected element" approach help in this case? 6 6 7 In todays Ajax world, DOM manipulation and elements living or not living on the DOM is very very common. I have many use cases that will fail because of the "non-disconnected element" approach. Is jQuery good only for the "non-disconnected element" approach? I request the jquery team to throughly think through this before tying this framework to the non-disconnected approach.7 In todays Ajax world, DOM manipulation and elements living or not living on the DOM is very very common. I have many use cases that will fail because of the "non-disconnected element" approach. Is jQuery good only for the non-disconnected elements? I request the jquery team to throughly think through this before tying this framework to the non-disconnected approach. 8 8 9 9 Meanwhile, I will have to look for a different approach to solve my problem. I could have piggy backed on jquery's .is() and .closest() methods but unfortunately they call the Sizzle.selectors.filter.ATTR which does not check for elem.getAttribute before invoking it. Any chances of doing a check before calling getAttribute (developers are innovative and will find many different ways to use a framework).