Estoy tratando de obtener y configurar el cambio de cookies en Javascript.
onMounted( async () => { const expando = ref('_cookie'); const nativeCookieDesc: any = ref(Object.getOwnPropertyDescriptor(Document.prototype, 'cookie')); Object.defineProperty(Document.prototype, expando.value, nativeCookieDesc.value) Object.defineProperty(Document.prototype, 'cookie', { enumerable: true, configurable: true, get() { return this[expando.value]; }, async set(value) { try { this[expando.value] = value; return; } catch { // } } }) }Pero recibo un error "Se excedió el tamaño máximo de la pila de llamadas" en este [expando.valor].
Tal vez use Document.prototype si este error. Gracias por la ayuda