property LegacyUserAgent.cookies
Private

A plain, JSON-serializable snapshot of this instance's cookie jar (the same live array the get/post/cookie_jar.add closures above mutate, not a copy) — every other property here is a function, which JSON.stringify silently drops, so a do_login-derived plugin's return ua; would otherwise cross handleRequest's writeLine (below) as an empty object. The host (lanrurugi-api::plugins::with_login_cookies) reads this off exec_login's result and threads it back into a later exec_metadata/exec_download/exec_script call as hostArgs.user_agent_cookies, which lanrurugi-plugin-converter's generated entry points rehydrate into a fresh userAgent() instance (see render.rs's render_user_agent_hydration_preamble) — a live object with closures can't itself cross that same JSON boundary, so this plain-array snapshot is what actually gets to do the traveling.

Type

Usage

import { type LegacyUserAgent } from "plugins/legacy-globals.d.ts";