docs: function scheduleTask(task) {
          frameTasks.push(task);
          if (rafId === -1) {
              requestAnimationFrame(function (t) {
                  rafId = -1;
                  var tasks = frameTasks;
                  frameTasks = [];
                  for (var i = 0; i < tasks.length; i++) {
                      tasks[i]();
                  }
              });
          }
      }