Mojo.Model.Cookie
Class Detail
Create a cookie object with a particular name
- Parameters:
- {String} cookieName
- name for the cookie
- {Object} optionalDocument
- optional document in which to store the cookie. Defaults to the current document.
| Method Name and Description |
|---|
|
get()
|
|
put(objectToStore, expirationDate)
|
|
remove()
|
Method Detail
Returns the object stored in this cookie, or undefined if no such cookie exists
Creates or updates the value of this cookie.
- Parameters:
- {Object} objectToStore
- Object to store in a cookie. Must be something that can be that can be encoded in JSON.
- {Date} expirationDate
- optional expiration date. Set to the current time or earlier will cause the cookie to be deleted.
Deletes this cookie.