Commit 149f6bea0b174eebfb9243bd4b94384adb0ac740
Update README.md
Dominic Tarr authored on 8/7/2017, 3:57:32 AMGitHub committed on 8/7/2017, 3:57:32 AM
Parent: 1aafd09e523fdb479815d832932868b6130cc2be
Files changed
README.md | changed |
README.md | |||
---|---|---|---|
@@ -391,11 +391,19 @@ | |||
391 | 391 … | ||
392 | 392 … | ||
393 | 393 … | ### onceIdle | |
394 | 394 … | ||
395 | -... | ||
395 … | +delay a function until the next [idle callback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback) | ||
396 … | +without hammering the `requestIdleCallback` api | ||
396 | 397 … | ||
398 … | +``` js | ||
399 … | +var onceIdle = require('mutant/once-idle') | ||
400 … | +onceIdle(function () { | ||
401 … | + //called once, at some later point (after rendering and such) | ||
402 … | +}) | ||
403 … | +``` | ||
397 | 404 … | ||
405 … | + | ||
398 | 406 … | ### resolve | |
399 | 407 … | ||
400 | 408 … | ... | |
401 | 409 … | ||
Built with git-ssb-web