Triggered when a site visitor's consent policy was changed using
setConsentPolicy()
or reset using
resetConsentPolicy()
.
Use the onConsentPolicyChanged()
method for code you want to run after
the site visitor's current consent policy was changed using
setConsentPolicy()
or reset using
resetConsentPolicy()
.
Usually, you want to call the onConsentPolicyChanged()
method in the masterpage.js file so that the onConsentPolicyChanged()
event runs no matter which
page on a site is used to change the policy.
handler(event: ConsentPolicyChangedEvent): void
The name of the method to run when the consent policy changes.