Hosted Fields
Listen For Changes
Before you initialize the SDK you will want to add a change event listener to get notified when the internal state of the field’s change.
For a full list of Change Event types and a complete description of the state
object, see the Hosted Fields SDK Reference Docs