DefinitelyTyped

Index

Variables

Variables

docCookies: docCookies

public getItem(sKey: string): string

Read a cookie. If the cookie doesn't exist a null value will be returned.

Parameters

  • sKey: string

Returns

string

public hasItem(sKey: string): boolean

Check if a cookie exists.

Parameters

  • sKey: string

Returns

boolean

public keys(): Array<string>

Returns an array of all readable cookies from this location.

Returns

Array<string>

public removeItem(sKey: string, sPath?: string): boolean

Delete a cookie.

Parameters

  • sKey: string
  • sPath?: string optional

Returns

boolean

public setItem(sKey: string, sValue: string, vEnd?: number, sPath?: string, sDomain?: string, bSecure?: boolean): boolean

Create/overwrite a cookie.

Parameters

  • sKey: string
  • sValue: string
  • vEnd?: number optional
  • sPath?: string optional
  • sDomain?: string optional
  • bSecure?: boolean optional

Returns

boolean

public setItem(sKey: string, sValue: string, vEnd?: string, sPath?: string, sDomain?: string, bSecure?: boolean): boolean

Create/overwrite a cookie.

Parameters

  • sKey: string
  • sValue: string
  • vEnd?: string optional
  • sPath?: string optional
  • sDomain?: string optional
  • bSecure?: boolean optional

Returns

boolean

public setItem(sKey: string, sValue: string, vEnd?: Date, sPath?: string, sDomain?: string, bSecure?: boolean): boolean

Create/overwrite a cookie.

Parameters

  • sKey: string
  • sValue: string
  • vEnd?: Date optional
  • sPath?: string optional
  • sDomain?: string optional
  • bSecure?: boolean optional

Returns

boolean