Integrate JavaScript Cookie API in Concrete5 Assets System.
Include library to your composer.json
composer require xanweb/c5-js-cookie
$g = \Concrete\Core\Http\ResponseAssetGroup::get();
$g->requireAsset('vendor-javascript', 'js-cookie');
Or like in Block Controller
public function registerViewAssets($outputContent = '')
{
$this->requireAsset('vendor-javascript', 'js-cookie');
}
If you have any issue regarding the JavaScript Cookie API please use JavaScript Cookie Issues Tracker.
The C5 JavaScript Cookie is open-sourced software licensed under the MIT license.