Paint order: by zIndex, ties by array position. Array.prototype.sort is stable, which is what makes the tie rule hold without a second key.
zIndex
Array.prototype.sort
Paint order: by
zIndex, ties by array position.Array.prototype.sortis stable, which is what makes the tie rule hold without a second key.