VID-1854 setting up JS for multiple instances