attachListener

Register a callback to be invoked when the value changes.

Parameters

listener

The callback to invoke.