MCPcopy Create free account
hub / github.com/ARM-software/AVH / createCookie

Method createCookie

DoxyGen/Doxygen_Templates/darkmode_toggle.js:127–136  ·  view source on GitHub ↗
(name, value, days)

Source from the content-addressed store, hash-verified

125
126
127 static createCookie(name, value, days) {
128 if (days) {
129 var date = new Date();
130 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
131 var expires = "; expires=" + date.toGMTString();
132 }
133 else var expires = "";
134
135 document.cookie = name + "=" + value + expires + "; path=/";
136 }
137
138 static readCookie(name) {
139 var nameEQ = name + "=";

Callers 3

eraseCookieMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected