Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The cookiestore object retrieves a list of cookies from the containing browser (which implies that this class is only available for code running inside a browser instance, not from roNodeJs).

cookiestore IDL

Code Block
languagejstitlecookiestore IDL
interface Cookie {
    attribute String domain;
    attribute String path;
    attribute String name;
    attribute String value;
};
 
interface cookiestore {
    Array<Cookie> getCookies();
};
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px



Object Creation

Code Block
languagejs
let CookieStoreClass = require("@brightsign/cookiestore");
let cookieStore = new CookieStoreClass();
getCookies()
Code Block
languagejs
    Array<Cookie> getCookies()

Gets cookies from the containing browser.

  • [string]

 domain
  •  domain: Specifies the hosts that are allowed to receive the cookie, including subdomains.

  • [string] path: To send the Cookie header, this URL path must exist in the URL request. 

  • [string] name: The name of the cookie

  • [string] value: The value of the cookie

Example

To list the cookies saved on a browser instance on a console:

Code Block
languagejs
let CookieStoreClass = require("@brightsign/cookiestore");
let cookieStore = new CookieStoreClass();

let cookies = cookieStore.getCookies();

cookies.forEach((cookie) => {console.log("Cookie domain: " + cookie.domain + " Cookie path:" + cookie.path + " Cookie name:" + cookie.name + " Cookie value:" + cookie.value)});