You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some code that calls $(container).resize(myFunc);
and then later $(container).removeResize(myFunc);
Sometimes the container is an element, other times it is the window object. The resize function has check for when this == window and forwards to the default jquery resize handler. There is no such check in the removeResize function so it goes about trying to splice __resizeListeners__ which don't exist and throws an exception.
Uncaught TypeError: Cannot read property 'splice' of undefined
The text was updated successfully, but these errors were encountered:
For those reaching this page when upgrading to jQuery 3.2.1, the same exception gets thrown because __resizeListeners__ is not set on the element if you use jQuery's recommended .on('resize' instead of .resize. This plugin creates a wrapper around $.fn.resize, as per @JoolsCaesar's comment
I have some code that calls
$(container).resize(myFunc);
and then later
$(container).removeResize(myFunc);
Sometimes the container is an element, other times it is the window object. The resize function has check for when
this == window
and forwards to the default jquery resize handler. There is no such check in the removeResize function so it goes about trying to splice__resizeListeners__
which don't exist and throws an exception.The text was updated successfully, but these errors were encountered: