https://github.com/liuuy/setzerotimeout
setTimeout with a shorter delay
https://github.com/liuuy/setzerotimeout
javascript settimeout typescript
Last synced: about 1 month ago
JSON representation
setTimeout with a shorter delay
- Host: GitHub
- URL: https://github.com/liuuy/setzerotimeout
- Owner: LiuuY
- Created: 2019-12-22T09:49:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-22T11:33:39.000Z (over 6 years ago)
- Last Synced: 2025-10-25T23:40:34.542Z (7 months ago)
- Topics: javascript, settimeout, typescript
- Language: TypeScript
- Size: 1000 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# setZeroTimeout
React 源码([在此](https://github.com/facebook/react/blob/eeb817785c771362416fd87ea7d2a1a32dde9842/packages/scheduler/src/Scheduler.js#L212-L222))在 polyfill requestIdleCallback 的时候使用了 postMessage 来使 [idleTick](https://github.com/facebook/react/blob/eeb817785c771362416fd87ea7d2a1a32dde9842/packages/scheduler/src/Scheduler.js#L343) 在下一次 Event Loop 时尽早执行。