Closed ayuishii closed 4 years ago
Github Issue: https://github.com/WICG/cookie-store/issues/139
Change set() method to be as follows
set()
Before
Promise<void> set(USVString name, USVString value, optional CookieStoreSetOptions options = {}); Promise<void> set(CookieStoreSetExtraOptions options); dictionary CookieStoreSetOptions { DOMTimeStamp? expires = null; USVString? domain = null; USVString path = "/"; CookieSameSite sameSite = "strict"; }; dictionary CookieStoreSetExtraOptions : CookieStoreSetOptions { required USVString name; required USVString value; };
After
Promise<void> set(USVString name, USVString value); Promise<void> set(CookieInit cookieInit); dictionary CookieInit { required USVString name; required USVString value; USVString? domain = null; USVString path = "/"; DOMTimeStamp? expires = null; CookieSameSite sameSite = "strict"; };
Usage examples:
cookieStore.set('cookie-name', 'cookie-value'); cookieStore.set({ name: 'cookie-name', value: 'cookie-value', path: '/' });
Preview | Diff
Github Issue: https://github.com/WICG/cookie-store/issues/139
Change
set()
method to be as followsBefore
After
Usage examples:
Preview | Diff