Skip to content

Instantly share code, notes, and snippets.

Jake Archibald In The Loop:

Does this create cause the element to flash for a brief millisecond?

document.body.appendChild(el);
el.style.display = none'

No. There's no race condition. All this code takes place before a rendering is ever triggered.

@zelaznik
zelaznik / gist:d8bf76097990b42c8f5a0b424dce3f36
Created July 3, 2018 12:20
Javascript Event Loop Notes
# Jake Archibald In The Loop:
Does this create cause the element to flash for a brief millisecond?
```js
document.body.appendChild(el);
el.style.display = none'
```
No. There's no race condition. All this code takes place before a rendering is ever triggered.
syntax on
set nocompatible
set number
set tabstop=2
set shiftwidth=2
set expandtab
set swapfile
set dir=~/tmp
set hlsearch
filetype indent plugin on
--ignore-file=ext:map
--ignore-file=ext:sql
--ignore-file=ext:log
--ignore-dir=dist
--ignore-dir=public
--ignore-dir=bower_components
--ignore-dir=node_modules
--ignore-dir=tmp
--ignore-dir=vendor