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.

The Stars

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:

cloud is dark

JSON loading

Here the loading of a JSON file. Every item added to the list is yielded, that give the impression of an animation.

Load:

2007, Yoan Blanc <yoan at dosimple.ch>