Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const areCookiesEnabled = () => {
- let cookieEnabled = !!navigator.cookieEnabled;
- if (typeof navigator.cookieEnabled === 'undefined' && !cookieEnabled) {
- document.cookie = 'testcookie';
- cookieEnabled = document.cookie.indexOf('testcookie') !== -1;
- }
- return cookieEnabled;
- };
Add Comment
Please, Sign In to add comment