Chart.js
Chart.js copied to clipboard
feat: Window-independent requestAnimationFrame
This PR ensures that library will be able to use requestAnimationFrame method regardless of platform.
For example, one can declare a polyfill of this method to Node's global object instead of browser's window and make use of it.
Methods like setTimeout are already used that way so they need no additional handling.
Inspiration came by discussion in #11579 which suggested adding support to chart platforms but this seemed to be a cleaner solution.