You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Services have the onAccept() and onReject() callbacks. There is no such things at the category level. The application has the onConsent() event.
The sequence of events occurs as follow:
service onAccept()
script execution for the enabled categories or services (ex <script type="text/plain" data-category="necessary">...</script>)
app event onConsent()
This is problematic if we want to do something when a category is accepted, before related scripts execution.
I am aware of two workarounds:
don't prevent scripts execution, but rather add, within the scripts, an onConsent() event listener and when the desired category is received, run the code. (see this post)
The limitations of this approach are the non negligible extra code (vs simply adding a data-category attribute to an existing script), and the difficulties if a script execution should be impacted by the accepted/rejected status of multiple categories.
add a single service to the category.
This limitation is more graphical than else, we now have 2 accepted/rejected sliders for the same category, as depicted here
Proposed solution
I propose to add the onAccept() and onReject() callbacks to the categories.
Alternatively, the app onConsent() event should be fired before executing the scripts associated with allowed categories or services .
Additional details
No response
The text was updated successfully, but these errors were encountered:
Description
V3.0.0
Services have the
onAccept()
andonReject()
callbacks. There is no such things at the category level. The application has theonConsent()
event.The sequence of events occurs as follow:
onAccept()
<script type="text/plain" data-category="necessary">...</script>
)onConsent()
This is problematic if we want to do something when a category is accepted, before related scripts execution.
I am aware of two workarounds:
onConsent()
event listener and when the desired category is received, run the code. (see this post)The limitations of this approach are the non negligible extra code (vs simply adding a
data-category
attribute to an existing script), and the difficulties if a script execution should be impacted by the accepted/rejected status of multiple categories.This limitation is more graphical than else, we now have 2 accepted/rejected sliders for the same category, as depicted here
Proposed solution
I propose to add the
onAccept()
andonReject()
callbacks to the categories.Alternatively, the app
onConsent()
event should be fired before executing the scripts associated with allowed categories or services .Additional details
No response
The text was updated successfully, but these errors were encountered: