1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["11537"],{66663(e,t,r){r.r(t),r.d(t,{metadata:()=>s,default:()=>l,frontMatter:()=>i,contentTitle:()=>a,toc:()=>p,assets:()=>c});var s=JSON.parse('{"id":"api/puppeteer.browsercontext.setcookie","title":"BrowserContext.setCookie() method","description":"Sets a cookie in the browser context.","source":"@site/.generated-docs/next/api/puppeteer.browsercontext.setcookie.md","sourceDirName":"api","slug":"/api/puppeteer.browsercontext.setcookie","permalink":"/next/api/puppeteer.browsercontext.setcookie","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"sidebar_label":"BrowserContext.setCookie"},"sidebar":"api","previous":{"title":"BrowserContext.pages","permalink":"/next/api/puppeteer.browsercontext.pages"},"next":{"title":"BrowserContext.setPermission","permalink":"/next/api/puppeteer.browsercontext.setpermission"}}'),n=r(74848),o=r(28453);let i={sidebar_label:"BrowserContext.setCookie"},a="BrowserContext.setCookie() method",c={},p=[{value:"Signature",id:"signature",level:3},{value:"Parameters",id:"parameters",level:2}];function d(e){let t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"browsercontextsetcookie-method",children:"BrowserContext.setCookie() method"})}),"\n",(0,n.jsx)(t.p,{children:"Sets a cookie in the browser context."}),"\n",(0,n.jsx)(t.h3,{id:"signature",children:"Signature"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-typescript",children:"class BrowserContext {\n abstract setCookie(...cookies: CookieData[]): Promise<void>;\n}\n"})}),"\n",(0,n.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)("table",{children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:(0,n.jsx)(t.p,{children:"Parameter"})}),(0,n.jsx)("th",{children:(0,n.jsx)(t.p,{children:"Type"})}),(0,n.jsx)("th",{children:(0,n.jsx)(t.p,{children:"Description"})})]})}),(0,n.jsx)("tbody",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsx)(t.p,{children:"cookies"})}),(0,n.jsx)("td",{children:(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"/next/api/puppeteer.cookiedata",children:"CookieData"}),"[]"]})}),(0,n.jsx)("td",{})]})})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Returns:"})}),"\n",(0,n.jsx)(t.p,{children:"Promise<void>"})]})}function l(e={}){let{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453(e,t,r){r.d(t,{R:()=>i,x:()=>a});var s=r(96540);let n={},o=s.createContext(n);function i(e){let t=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.