Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies: Fix Goja conversions #1039

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 10 additions & 9 deletions api/browser_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@ type BrowserContext interface {
//
// https://datatracker.ietf.org/doc/html/rfc6265.
type Cookie struct {
Name string `json:"name"` // Cookie name.
Value string `json:"value"` // Cookie value.
Domain string `json:"domain"` // Cookie domain.
Path string `json:"path"` // Cookie path.
Expires int64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch.
HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only.
Secure bool `json:"secure"` // True if cookie is secure.
SameSite CookieSameSite `json:"sameSite"` // Cookie SameSite type.
URL string `json:"url,omitempty"` // Cookie URL.
Name string `json:"name"` // Cookie name.
Value string `json:"value"` // Cookie value.
Domain string `json:"domain"` // Cookie domain.
Path string `json:"path"` // Cookie path.
ankur22 marked this conversation as resolved.
Show resolved Hide resolved
HTTPOnly bool `js:"httpOnly" json:"httpOnly"` // True if cookie is http-only.
Secure bool `json:"secure"` // True if cookie is secure.
SameSite CookieSameSite `js:"sameSite" json:"sameSite"` // Cookie SameSite type.
URL string `js:"url" json:"url,omitempty"` // Cookie URL.
// Cookie expiration date as the number of seconds since the UNIX epoch.
Expires int64 `json:"expires"`
}

// CookieSameSite represents the cookie's 'SameSite' status.
Expand Down