Changes between Initial Version and Version 1 of Ticket #9317, comment 22
- Timestamp:
- Jul 3, 2014, 3:11:34 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9317, comment 22
initial v1 7 7 > IMHO it make sense to encapsulate this logic into separate function just for readability sake. One does not have to deal with this complexity if he's browsing/working with {{{onDomReady}}}. Function {{{resizeStartListener}}} in fact should be inside the object, I've fixed that. 8 8 9 So you can move this code to a separate function, but not to object. You don't need object, because there's no state , excepand there will be just one function with another function defined inside it. Actually - I'm wrong - there's state, but... you keep it in closure. So why not keeping everything in closure?9 So you can move this code to a separate function, but not to object. You don't need object, because there's no state and there will be just one function with another function defined inside it. Actually - I'm wrong - there's state, but... you keep it in closure. So why not keeping everything in closure? 10 10 11 11 >