mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDocs and methods and updated script (#2927)
This commit is contained in:
committed by
Eugenio Romano
parent
2bfed5818f
commit
76ad797488
@@ -20,6 +20,9 @@ import { Injectable } from '@angular/core';
|
||||
@Injectable()
|
||||
export class CookieService {
|
||||
|
||||
/**
|
||||
* Checks if cookies are enabled.
|
||||
*/
|
||||
isEnabled(): boolean {
|
||||
// for certain scenarios Chrome may say 'true' but have cookies still disabled
|
||||
if (navigator.cookieEnabled === false) {
|
||||
@@ -31,8 +34,8 @@ export class CookieService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve cookie by key.
|
||||
*
|
||||
* Retrieves a cookie by its key.
|
||||
* @param key Key to identify the cookie
|
||||
* @returns {string | null}
|
||||
*/
|
||||
getItem(key: string): string | null {
|
||||
@@ -43,10 +46,10 @@ export class CookieService {
|
||||
|
||||
/**
|
||||
* Set a cookie.
|
||||
* @param key
|
||||
* @param data
|
||||
* @param expiration
|
||||
* @param path
|
||||
* @param key Key to identify the cookie
|
||||
* @param data Data value to set for the cookie
|
||||
* @param expiration Expiration date of the data
|
||||
* @param path "Pathname" to store the cookie
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user