Closed mkrivan closed 5 years ago
Hi @mkrivan and thank you for your thoughts. Indeed, this seems like a mistake. That IE8 check should probably be moved from the object strategy somewhere to https://github.com/wnr/element-resize-detector/blob/master/src/element-resize-detector.js#L117. It seems like the main code should check if IE8 and then choose this "native" strategy regardless desired strategy.
Are you interested in creating a pull request? Otherwise it will probably take me a few days to fix this myself.
I believe this has now been fixed in the https://github.com/wnr/element-resize-detector/tree/WIP-1.2.0 branch, could you give it a try?
When I use IE8 an exception raised which comes from object strategy code (detection-strategy/object.js) see below:
I found it quite obvious because the object value is missing in IE8 (mentioned as well in the documentation). But there is also a part in this method where IE8 is checked and the object value is created. When I have commented out the getObject() check everything worked perfect.
Somewhere it is mentioned that the scroll strategy could also work but in IE8 unfortunately not. A quite strange runtime exception occures.
Would you check my reflection? Many thanks for all of your efforts. This library is something extremely useful.