yield
in JS
The goal here is to show how to generate a yield
in
JavaScript that will refresh the layout during high-cost DOM operations.
This script generate stars in the sky, many of them. You can choose between the vanilla one and the yield one.
Example with 100: and 1000:
Here the loading of a JSON file. Every item added to the list is yielded, that give the impression of an animation.
Load: