function _initRequestAnimationFrame() {
  let func;

  if (window !== undefined) {
    func =
      window.requestAnimationFrame ||
      window.mozRequestAnimationFrame ||
      window.webkitRequestAnimationFrame ||
      window.msRequestAnimationFrame;
  }

  if (func === undefined) {
    // window or method not present, setting mock requestAnimationFrame
    window.requestAnimationFrame = function (callback) {
      //console.log("Called mock requestAnimationFrame");
      callback();
    };
  } else {
    window.requestAnimationFrame = func;
  }
}
Initializes window.requestAnimationFrame() to a usable form.

Specifically, set up this method for the case of running on node.js with jsdom enabled.

NOTES:

On node.js, when calling this directly outside of this class, `window` is not defined.
This happens even if jsdom is used.
For node.js + jsdom, `window` is available at the moment the constructor is called.
For this reason, the called is placed within the constructor.
Even then, `window.requestAnimationFrame()` is not defined, so it still needs to be added.
During unit testing, it happens that the window object is reset during execution, causing
a runtime error due to missing `requestAnimationFrame()`. This needs to be compensated for,
see `_requestNextFrame()`.
Since this is a global object, it may affect other modules besides `Network`. With normal
usage, this does not cause any problems. During unit testing, errors may occur. These have
been compensated for, see comment block in _requestNextFrame().
@private