6 điểm bởi xguru 2020-10-20 | Chưa có bình luận nào. | Chia sẻ qua WhatsApp
  • Thay thế document.cookie theo cách cũ

  • Trả về Promise nên cũng có thể dùng trong Service Worker

  • Truy cập trực tiếp theo từng cookie, không cần tìm qua vòng lặp

  • Đăng ký event listener để theo dõi thay đổi cookie

await cookieStore.get('session_id')

await cookieStore.set({ name: 'opt_out', value: '1' });

await cookieStore.delete('session_id');

cookieStore.subscribeToChanges([{ name: 'session_id' }])

Chưa có bình luận nào.

Chưa có bình luận nào.