"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[23402],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>d});varn=a(67294);functionr(e,t,a){returntine?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}functionl(e,t){vara=Object.keys(e);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}returna}functionp(e){for(vart=1;t<arguments.length;t++){vara=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}returne}functioni(e,t){if(null==e)return{};vara,n,r=function(e,t){if(null==e)return{};vara,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(r[a]=e[a]);returnr}(e,t);if(Object.getOwnPropertySymbols){varl=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}returnr}varo=n.createContext({}),u=function(e){vart=n.useContext(o),a=t;returne&&(a="function"==typeofe?e(t):p(p({},t),e)),a},s=function(e){vart=u(e.components);returnn.createElement(o.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){vart=e.children;returnn.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){vara=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),m=u(a),d=r,g=m["".concat(o,".").concat(d)]||m[d]||c[d]||l;returna?n.createElement(g,p(p({ref:t},s),{},{components:a})):n.createElement(g,p({ref:t},s))}));functiond(e,t){vara=arguments,r=t&&t.mdxType;if("string"==typeofe||r){varl=a.length,p=newArray(l);p[0]=m;vari={};for(varoint)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeofe?e:r,p[1]=i;for(varu=2;u<l;u++)p[u]=a[u];returnn.createElement.apply(null,p)}returnn.createElement.apply(null,a)}m.displayName="MDXCreateElement"},54341:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>m,frontMatter:()=>p,metadata:()=>o,toc:()=>s});a(67294);varn=a(3905);functionr(){returnr=Object.assign||function(e){for(vart=1;t<arguments.length;t++){vara=arguments[t];for(varnina)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}returne},r.apply(this,arguments)}functionl(e,t){if(null==e)return{};vara,n,r=function(e,t){if(null==e)return{};vara,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(r[a]=e[a]);returnr}(e,t);if(Object.getOwnPropertySymbols){varl=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}returnr}constp={sidebar_label:"Page.evaluate"},i="Page.evaluate() method",o={unversionedId:"api/puppeteer.page.evaluate",id:"version-20.2.1/api/puppeteer.page.evaluate",title:"Page.evaluate() method",description:"Evaluates a function in the page's context and returns the result.",source:"@site/versioned_docs/version-20.2.1/api/puppeteer.page.evaluate.md",sourceDirName:"api",slug:"/api/puppeteer.page.evaluate",permalink:"/api/puppeteer.page.evaluate",draft:!1,tags:[],version:"20.2.1",frontMatter:{sidebar_label:"Page.evaluate"},sidebar:"api",previous:{title:"Page.emulateVisionDeficiency",permalink:"/api/puppeteer.page.emulatevisiondeficiency"},next:{title:"Page.evaluateHandle",permalink:"/api/puppeteer.page.evaluatehandle"}},u={},s=[{value:"Signature:",id:"signature",level:4},{value:"Parameters",id:"parameters",level:2},{value:"Example 1",id:"example-1",level:2},{value:"Example 2",id:"example-2",level:2},{value:"Example 3",id:"example-3",level:2}],c={toc:s};functionm(e){var{components:t}=e,a=l(e,["components"]);return(0,n.kt)("wrapper",r({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",r({},{id:"pageevaluate-method"}),"Page.evaluate() method"),(0,n.kt)("p