dojo / core

:rocket: Dojo 2 - language helpers and utilities.
http://dojo.io
Other
213 stars 62 forks source link

Guarantee util.throttle delay #360

Closed edhager closed 6 years ago

edhager commented 6 years ago

setTimeout in Edge and IE 11 do not guarantee the delay value. In my testing, if the delay is greater than 200ms, then setTimeout is reliable but with a smaller delay, the callback function can fire early roughly 50% of the time.

I created util.guaranteeMinimumTimeout() which makes sure the desired amount of time has passed.

Fixes: #357

edhager commented 6 years ago

The test failure "Attempt to detect unregistered has feature "web-worker-xhr-upload" is addressed in another ticket/PR: PR #361