Header menu logo fable-electron-docs-api

Cookie Type

Constructors

Constructor Description

Cookie(name, value, sameSite, ?domain, ?hostOnly, ?path, ?secure, ?httpOnly, ?session, ?expirationDate)

Full Usage: Cookie(name, value, sameSite, ?domain, ?hostOnly, ?path, ?secure, ?httpOnly, ?session, ?expirationDate)

Parameters:
    name : string - The name of the cookie.
    value : string - The value of the cookie.
    sameSite : SameSite - The Same Site policy applied to this cookie. Can be unspecified, no_restriction, lax or strict.
    ?domain : string - The domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains.
    ?hostOnly : bool - Whether the cookie is a host-only cookie; this will only be true if no domain was passed.
    ?path : string - The path of the cookie.
    ?secure : bool - Whether the cookie is marked as secure.
    ?httpOnly : bool - Whether the cookie is marked as HTTP only.
    ?session : bool - Whether the cookie is a session cookie or a persistent cookie with an expiration date.
    ?expirationDate : double - The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies.

Returns: Cookie
name : string

The name of the cookie.

value : string

The value of the cookie.

sameSite : SameSite

The Same Site policy applied to this cookie. Can be unspecified, no_restriction, lax or strict.

?domain : string

The domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains.

?hostOnly : bool

Whether the cookie is a host-only cookie; this will only be true if no domain was passed.

?path : string

The path of the cookie.

?secure : bool

Whether the cookie is marked as secure.

?httpOnly : bool

Whether the cookie is marked as HTTP only.

?session : bool

Whether the cookie is a session cookie or a persistent cookie with an expiration date.

?expirationDate : double

The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies.

Returns: Cookie

Instance members

Instance member Description

this.domain

Full Usage: this.domain

The domain of the cookie; this will be normalized with a preceding dot so that it's also valid for subdomains.

this.expirationDate

Full Usage: this.expirationDate

The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies.

this.hostOnly

Full Usage: this.hostOnly

Whether the cookie is a host-only cookie; this will only be true if no domain was passed.

this.httpOnly

Full Usage: this.httpOnly

Whether the cookie is marked as HTTP only.

this.name

Full Usage: this.name

The name of the cookie.

this.path

Full Usage: this.path

The path of the cookie.

this.sameSite

Full Usage: this.sameSite

The Same Site policy applied to this cookie. Can be unspecified, no_restriction, lax or strict.

this.secure

Full Usage: this.secure

Whether the cookie is marked as secure.

this.session

Full Usage: this.session

Whether the cookie is a session cookie or a persistent cookie with an expiration date.

this.value

Full Usage: this.value

The value of the cookie.

Type something to start searching.