Format snippets
This commit is contained in:
@ -18,6 +18,8 @@ defer(console.log, 'a'), console.log('b'); // logs 'b' then 'a'
|
||||
|
||||
// Example B:
|
||||
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
|
||||
longRunningFunction();
|
||||
// Browser will not update the HTML until this has finished
|
||||
defer(longRunningFunction);
|
||||
// Browser will update the HTML then run the function
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user