Funny to still discover new things, I never knew there was a global property self on the window object. But anyway, I think you can achieve the effect you’re looking for very easily with CSS with an animation:
body {
transform:scale(0);
animation:grow 3s forwards;
}
@keyframes grow {
to {
transform:scale(1)
}
}
I don’t think there is a difference between window and self in this case (didn’t really check). Usually, when people use self they have assigned it the this value from a different scope.
Also, you are not calling the function anywhere. I would assume it is meant to be used as a resize handler or something?
Note: It’s not possible to resize a window or tab that wasn’t created by window.open(). It’s also not possible to resize when the window has multiple tabs.