If you wanted to go further with light change detection, an sensitive and low power consuming op amp in diff and integration circuitry could do be added to trip a setWatch()-ed pin.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
For light events, take a look at dtdv detector.
If you wanted to go further with light change detection, an sensitive and low power consuming op amp in diff and integration circuitry could do be added to trip a setWatch()-ed pin.