The set() method of the CookieStore interface sets a cookie with the given name and value or options object.
set()
name
value
options
MDN Reference