Open klonos opened 4 years ago
Tiny update on this: deprecated jquery.cookie has also been replaced with js-cookie in Drupal 8.9.0 release.
FTR: this also came up in #4718:
@indigoxela
Backdrop ships with jquery.cookie.js version 1.0 (2006), but that's pretty outdated: The initial project has been archived and replaced by a new project js-cookie.
It seems that sameSite attribute support has been added in 2016: https://github.com/js-cookie/js-cookie/issues/276
We should really update jquery.cookie.js. (or actually switch to js.cookie)
@quicksketch
Considering
js-cookie
andjquery.cookie.js
were written by the same author, they helpfully provided a backwards-compatible approach that we might be able to use: https://github.com/js-cookie/js-cookie/tree/v1.5.1#migrating-from-jquery-cookie$.cookie('name', 'value') === Cookies.set('name', 'value') $.cookie('name') === Cookies.get('name') $.removeCookie('name') === Cookies.remove('name') $.cookie() === Cookies.get()
Though I'm not sure if that's really a good idea. Backdrop core's usage of the library is pretty minimal though, only in Tabledrag, Contact module, and Comment module.
This is the respective issue for https://www.drupal.org/project/drupal/issues/2550717 and its follow-up https://www.drupal.org/project/drupal/issues/3118726.