jfeltkamp / cookiesjsr

Easily expandable cookie consent tool.
Other
22 stars 5 forks source link

Can't subscribe to an event precisely when the user chose something #16

Open kaszarobert opened 2 years ago

kaszarobert commented 2 years ago

The problem with cookiesjsrUserConsent event that it is fired also during page load. At then, the user didn't choose anything at all yet. That way we can't write code that does something only when the user given his consent.

Maybe there should be a separate event for these.

kaszarobert commented 2 years ago

Well, there's a way right now: using cookiesjsrCallbackResponse but that only works if I need to communicate with servers.

I'm still suggesting that it would be much more intuitive to introduce a cookiesjsrUserConsentChanged event for these occasions.