Skip to content

Commit

Permalink
Fixes for Page.cookie type
Browse files Browse the repository at this point in the history
Remove session field. This isn't present, and if expires is not set
then it is a session cookie.

Typecheck the sameSite strings with bs.string.

Adjusts order to be consistent with Puppeteer.
  • Loading branch information
zploskey committed Jun 8, 2018
1 parent 01b5f51 commit 6ea5ddf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Page.re
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ type cookie = {
.
"name": string,
"value": string,
"domain": Js.undefined(string),
"url": Js.undefined(string),
"domain": Js.undefined(string),
"path": Js.undefined(string),
"expires": Js.undefined(float),
"httpOnly": Js.undefined(bool),
Expand Down Expand Up @@ -81,14 +81,13 @@ external makeCookie :
(
~name: string,
~value: string,
~domain: string=?,
~url: string=?,
~domain: string=?,
~path: string=?,
~expires: float=?,
~httpOnly: bool=?,
~secure: bool=?,
~session: bool=?,
~sameSite: string=?,
~sameSite: [@bs.string] [ | `Strict | `Lax]=?,
unit
) =>
cookie =
Expand Down

0 comments on commit 6ea5ddf

Please sign in to comment.