Change sequence on js execution