The innovation can help degrade industrial pollutants such as toxic dyes. The approach includes generating the chemical directly within the battery.