Posts tagged with 'javascript'
- Abortable promise chains
TL;DR: An idea for a small library that makes it easier to abort Promise chains.
November 28, 2022 - Stripping html - dos, don'ts and more
TL;DR: Use template (not div) and textContent (not innerText).
October 7, 2022 - Need cheap paint? Use getComputedStyle().opacity
TL;DR: If you need a double rAF() for a transition to work, getComputedStyle().opacity may be a cheap, synchronous alternative.
July 6, 2022 - Returning a promise in new Promise() vs .then()
TL;DR: Returning a promise in `new Promise()` never resolves, but returning a promise in `.then()` does.
May 16, 2022