I want to know when the window size change.
I found this post JavaScript window resize event and it works when I resize the window, but not if I click on the fullscreen button, or if I use the shortcut "Window" + "Up"
/ "Window" + "Left"
etc.
In fact it doesn't detect if the window resize when the window pass from a size to an other size without transition
Is it possible to detect that ? Thanks
For the moment I've got :
var addEvent = function(object, type, callback) {
if (object == null || typeof(object) == 'undefined') return;
if (object.addEventListener) {
object.addEventListener(type, callback, false);
} else if (object.attachEvent) {
object.attachEvent("on" + type, callback);
} else {
object["on"+type] = callback;
}
};
let this2 = this;
addEvent(window, "resize", function(event) {
this2.prepareAnimation();
});