Skip to content

use requestAnimationFrame mock setTimeout and setInterval

License

Notifications You must be signed in to change notification settings

paper/RAF-mock-timeout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAF-mock-timeout

use requestAnimationFrame mock setTimeout and setInterval

注意事项

  • 比如当切换浏览器 tab 标签时,requestAnimationFrame 会进行优化,可能会变慢,所以时间不一定和 setTimeout 一致。

开发与调试

  1. npm i
  2. npm run build
  3. vscode 打开 test/index.html
  4. 右键运行 Open with Live Server (安装 Live Server 插件)

About

use requestAnimationFrame mock setTimeout and setInterval

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published