From d5f2bc466c1f23ae05c1431b79d0739c45f584fe Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Fri, 26 Jan 2018 02:33:27 +0000 Subject: [PATCH] Travis build: 1423 --- README.md | 2 +- docs/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8067f8213..08c12c464 100644 --- a/README.md +++ b/README.md @@ -3431,7 +3431,7 @@ defer(longRunningFunction); // Browser will update the HTML then run the functio
[⬆ Back to top](#table-of-contents) -### defer +### delay Invokes the provided function after `wait` milliseconds. diff --git a/docs/index.html b/docs/index.html index a95790372..7c85f7213 100644 --- a/docs/index.html +++ b/docs/index.html @@ -762,7 +762,7 @@ console.log< document.querySelector('#someElement').innerHTML = 'Hello'; longRunningFunction(); //Browser will not update the HTML until this has finished defer(longRunningFunction); // Browser will update the HTML then run the function -

defer

Invokes the provided function after wait milliseconds.

Use setTimeout() to delay execution of fn. Use the spread (...) operator to supply the function with an arbitrary number of arguments.

const delay = (fn, wait, ...args) => setTimeout(fn, wait, ...args);
+

delay

Invokes the provided function after wait milliseconds.

Use setTimeout() to delay execution of fn. Use the spread (...) operator to supply the function with an arbitrary number of arguments.

const delay = (fn, wait, ...args) => setTimeout(fn, wait, ...args);
 
delay(
   function(text) {
     console.log(text);