Skip to content

Commit 7768637

Browse files
committed
Add info about requestAnimationFrame
1 parent ace45eb commit 7768637

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ResizeSensor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
;
77
(function() {
88

9+
// Only used for the dirty checking, so the event callback count is limted to max 1 call per fps per sensor.
10+
// In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
11+
// would generate too many unnecessary events.
912
var requestAnimationFrame = window.requestAnimationFrame ||
1013
window.mozRequestAnimationFrame ||
1114
window.webkitRequestAnimationFrame ||

0 commit comments

Comments
 (0)