How to use the call function from raf

Find comprehensive JavaScript raf.call code examples handpicked from public code repositorys.

863
864
865
866
867
868
869
870
871
872
873


module.exports = function(fn) {
  // Wrap in a new function to prevent
  // `cancel` potentially being assigned
  // to the native rAF function
  return raf.call(root, fn)
}
module.exports.cancel = function() {
  caf.apply(root, arguments)
}
fork icon0
star icon0
watch icon0