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 handler runs no matter which
page on your site is used to change the policy.
handler(event: ConsentPolicyChangedEvent): void
The name of the function or
the function expression to run when the consent policy is changed.