Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
1cg committed Jun 15, 2023
1 parent 27e9658 commit 123c5e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/_hyperscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,9 @@
finalValue += ";samesite=lax"
} else {
finalValue = encodeURIComponent(value.value);
if (value.expires) {
finalValue+=";expires=" + value.maxAge;
}
if (value.maxAge) {
finalValue+=";max-age=" + value.maxAge;
}
Expand Down
5 changes: 4 additions & 1 deletion www/expressions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="basicgrid fullbleed pad col-width-l">
<div class="basicgrid pad col-width-l">
<div class="col-1">

**Contents**
Expand Down Expand Up @@ -410,6 +410,9 @@ The `cookies` symbol is an automatically available symbol in all contexts that p
```hyperscript
set cookies.myCookie to 'foo' # sets the cooke 'myCookie' to the value true, forever
set cookies['myCookie'] to 'bar' # updates the previous cookies value
set cookies['myCookie'] to
{value: 'doh',
expires: maxAge:6000} # set value and make it expire in 6000 seconds or 100 minutes
cookies.clear('myCookie') # clears the given cookie
cookies.clearAll() # clears all cookies
cookies.length # returns the number of cookies
Expand Down

0 comments on commit 123c5e7

Please sign in to comment.