Refs #7897 JS improvement