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
{{ message }}
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.
Sorry for crosspost - not sure if it belonged here or in the theme-scripts repo
Shopify starter and Slate have a function that looks like the below.
import {cookiesEnabled} from '@shopify/theme-cart';
// Apply a specific class to the html element for browser support of cookies.
if (cookiesEnabled()) {
document.documentElement.className = document.documentElement.className.replace('supports-no-cookies', 'supports-cookies');
}
However the latest version of theme scripts / cart doesn't have that function cookiesEnabled exporting. This may be related to issue #5
The text was updated successfully, but these errors were encountered:
Since the check for cookies it pretty straight forward and is not directly scoped to Shopify's Cart API, I decided not to include it in the v1 of theme-cart.
We definitely need to update this theme before upgrading to the latest version! Thanks.
I'd be down to just put the contents of the the cookiesEnabled function directly in Starter Theme for now until we sort out where it can live in theme-scripts.
Not a huge deal - on a bit of a code freeze until after Xmas so thought I'd put some work in here. I'll open an issue for something else I noticed and work on that instead if we give it the go ahead.
// Apply a specific class to the html element for browser support of cookies.if(window.navigator.cookieEnabled){document.documentElement.className=document.documentElement.className.replace('supports-no-cookies','supports-cookies',);}
Seems effective enough.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sorry for crosspost - not sure if it belonged here or in the theme-scripts repo
Shopify starter and Slate have a function that looks like the below.
However the latest version of theme scripts / cart doesn't have that function cookiesEnabled exporting. This may be related to issue #5
The text was updated successfully, but these errors were encountered: