[ADF-2557] Updated doc files with new script and fixed script bugs (#3135)

This commit is contained in:
Andy Stark
2018-03-29 17:02:40 +01:00
committed by Eugenio Romano
parent 9401e77e0c
commit 717dbfb388
19 changed files with 306 additions and 164 deletions

View File

@@ -1,25 +1,30 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-29
---
# Cookie service
Stores key-value data items as browser cookies.
## Methods
## Class members
- `isEnabled(): boolean`
Checks if cookies are enabled.
### Methods
- `getItem(key: string): string`
Retrieves a cookie by its key.
- `key` - Key to identify the cookie
- `setItem(key: string, data: string, expiration: Date | null, path: string | null)`
Set a cookie.
- `key` - Key to identify the cookie
- `data` - Data value to set for the cookie
- `expiration` - Expiration date of the data
- `path` - "Pathname" to store the cookie
- `getItem(key: string = null): string | null`<br/>
Retrieves a cookie by its key.
- `key: string = null` - Key to identify the cookie
- **Returns** `string | null` - The cookie data or null if it is not found
- `isEnabled(): boolean`<br/>
Checks if cookies are enabled.
- **Returns** `boolean` - True if enabled, false otherwise
- `setItem(key: string = null, data: string = null, expiration: Date | null = null, path: string | null = null)`<br/>
Sets a cookie.
- `key: string = null` - Key to identify the cookie
- `data: string = null` - Data value to set for the cookie
- `expiration: Date | null = null` - Expiration date of the data
- `path: string | null = null` - "Pathname" to store the cookie
## Details