Writes a cookie into the browser cookie jar so the storefront returns it on
subsequent requests made with credentials: "include". No-ops with a
warning when the API is unavailable, and swallows write failures (logging
them) so a failed seed never aborts the surrounding query.
Reads every cookie the jar holds for the given URL. Useful for verifying that session cookies are being stored/updated across requests. Returns an empty array when the API is unavailable or the read fails.
Reads a single named cookie for the given URL. Returns null when the
cookie is absent, the API is unavailable, or the read fails.
Reports whether the
chrome.cookiesAPI is usable in the current context. It isundefinedunless the extension has the "cookies" permission and the host permission for the origin, so callers guard with this to degrade gracefully (dev fallback, or when a user hasn't accepted the upgraded permission set yet).