added js execution to generic listener