Does Window function work in MV (base JavaScript)

I found a really good site where there are sample animations that you can do with drawing canvases and all the other things about javascript functions. I jumped to it and looked at the examples, but I was wondering if Window, which is originally on js actually works well in MV? like onload, oncancelframe, etc.

Example:

if (!window.cancelAnimationFrame) { window.cancelAnimationFrame = (window.cancelRequestAnimationFrame || window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.mozCancelRequestAnimationFrame || window.msCancelAnimationFrame || window.msCancelRequestAnimationFrame || window.oCancelAnimationFrame || window.oCancelRequestAnimationFrame || window.clearTimeout);}If I want to make a game enclosed only in an exe file, would it be that helpful / would it work if the animation is written this way?
The window object still exists, but you shouldn't directly call anything that has to do with the animation frame, since that's what the SceneManager does in the background.
I set things to the window object only when you need public API, so doing: 

window.x = y;then later on:

x.functionName(arg);Again this is for public user facing API.

Original thread: https://forums.rpgmakerweb.com/threads/does-window-function-work-in-mv-base-javascript.52179/