Consent v0.2.0
Persistence and enforcement
Connect UI decisions to your storage and optional services.
Commit decisions at one boundary
Treat Accept, Reject and Apply as requests to commit. Construct the correct category map, persist the accepted decision, update service permissions, then close the banner.
Use the same category IDs in the UI, persisted records and service configuration. Retain required categories according to your application policy; do not assume every custom category is optional.
Restore deliberately
Your application chooses storage, expiry, schema version and when a visitor must choose again. Validate stored values before using them. If storage is unavailable or invalid, keep optional services inactive and offer a fresh choice.
Restore choices before initializing the quickstart wrapper. A mounted wrapper's initialPreferences is an initial value, not a subscription to later storage changes.
Control optional services
Prevent optional scripts and requests before permission is granted. When a user revokes a category, prevent future activity and update your own stored decision. Disabling a UI switch cannot undo data already sent to another service.
The banner does not provide a script manager, cookie deletion service or cross-tab synchronization. Implement and test those behaviors at the application boundary when your product needs them.
Test the actual services
Check browser network traffic before a choice, after rejection, after acceptance, and after revocation. UI screenshots and callback logs alone cannot establish that scripts are blocked.