JavaScript functions can be registered as listeners to changes in a GeoGebra construction. See Event Listeners for a syntax description of the used methods.