wnr / element-resize-detector

Optimized cross-browser resize listener for elements.
MIT License
1.32k stars 118 forks source link

Seems like when calling listenTo, only the first function will be added to the object resize event listener. #4

Closed wnr closed 9 years ago

wnr commented 9 years ago

Can be solved by having only one function applied to the object, which calls all listeners

asurabhi commented 7 years ago

IMO this should be fixed in the library. I am using this in react where the suggested solution is not easy.

wnr commented 7 years ago

Could you give me more information how this affects you? This should only be an implementation detail of the library, all functions you attach to listenTo should be called (see test case https://github.com/wnr/element-resize-detector/blob/master/test/element-resize-detector_test.js#L149). Is this not the case?