var matches = event.target.matches
? event.target.matches('.ch-cookie-consent__btn')
: event.target.msMatchesSelector('.ch-cookie-consent__btn');
addEventListener on cookieConsentForm
var cookieConsentFormBtn = document.getElementsByClassName('ch-cookie-consent__btn')[0];
// Submit form via ajax
cookieConsentFormBtn.addEventListener('click', function () {...});
Hi! Thanks for the bundle.
https://github.com/ConnectHolland/cookie-consent-bundle/blob/119ce69e8e7b9435a7c240fdecb2a3017be8ec79/Resources/public/js/cookie_consent.js#L25
https://caniuse.com/#feat=matchesselector As you can see
event.target.matches
not working on IE 11.There are two solutions: