B2G/gecko/browser/components/preferences/aboutPermissions.js
/**
   * Gets cookies stored for the site. This does not return cookies stored
   * for the base domain, only the exact hostname stored for the site.
   *
   * @return An array of the cookies set for the site.
   */
Gets cookies stored for the site. This does not return cookies stored
for the base domain, only the exact hostname stored for the site.

@return An array of the cookies set for the site.
Gets cookies stored for the site . This does not return cookies stored for the base domain only the exact hostname stored for the site . @return An array of the cookies set for the site .
get cookies() {
    let cookies = [];
    let enumerator = Services.cookies.getCookiesFromHost(this.host);
    while (enumerator.hasMoreElements()) {
      let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2);
      if (cookie.rawHost == this.host) {
        cookies.push(cookie);
      }
    }
    return cookies;
  }
get cookies ( ) { let cookies = [ ] ; let enumerator = Services . cookies . getCookiesFromHost ( this . host ) ; while ( enumerator . hasMoreElements ( ) ) { let cookie = enumerator . getNext ( ) . QueryInterface ( Ci . nsICookie2 ) ; if ( cookie . rawHost == this . host ) { cookies . push ( cookie ) ; } } return cookies ; }
Gets cookies stored for the site.
Gets cookies stored for the site .
// getCookiesFromHost returns cookies for base domain, but we only want // the cookies for the exact domain.