Skip to content

Commit

Permalink
Merge 3d71149 into 680440b
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed Jul 2, 2020
2 parents 680440b + 3d71149 commit 2c019d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion framework/source/class/qx/bom/Cookie.js
Expand Up @@ -89,8 +89,9 @@ qx.Bootstrap.define("qx.bom.Cookie",
* @param path {String?null} Path value.
* @param domain {String?null} Domain value.
* @param secure {Boolean?null} Secure flag.
* @param sameSite {String?null} sameSite value. (Lax, Strict, None)
*/
set : function(key, value, expires, path, domain, secure)
set : function(key, value, expires, path, domain, secure, sameSite)
{
// Generate cookie
var cookie = [ key, "=", encodeURIComponent(value) ];
Expand All @@ -114,6 +115,10 @@ qx.Bootstrap.define("qx.bom.Cookie",
if (secure) {
cookie.push(";secure");
}

if (sameSite) {
cookie.push(";sameSite=", sameSite);
}

// Store cookie
document.cookie = cookie.join("");
Expand Down

0 comments on commit 2c019d8

Please sign in to comment.