JavaScript
- 2 ответа
- 0 вопросов
2
Вклад в тег
const target = {
cookies
};
const handler = {
get: function(target, domain) {
var domain_cookies = [];
for (var c = 0; c < target.length; c++) {
if (target[c]['domain'].includes(domain)) {
domain_cookies.push(target[c]['name'] + '=' + target[c]['value']);
}
}
return domain_cookies.join('; ');
}
};
const proxy = new Proxy(target, handler);
console.log(proxy['somesite']);