"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[61080],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});varr=n(67294);functiona(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}functiono(e,t){varn=Object.keys(e);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}returnn}functionp(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}functioni(e,t){if(null==e)return{};varn,r,a=function(e,t){if(null==e)return{};varn,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);returna}(e,t);if(Object.getOwnPropertySymbols){varo=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}returna}varl=r.createContext({}),c=function(e){vart=r.useContext(l),n=t;returne&&(n="function"==typeofe?e(t):p(p({},t),e)),n},u=function(e){vart=c(e.components);returnr.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){vart=e.children;returnr.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){varn=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=c(n),d=a,f=m["".concat(l,".").concat(d)]||m[d]||s[d]||o;returnn?r.createElement(f,p(p({ref:t},u),{},{components:n})):r.createElement(f,p({ref:t},u))}));functiond(e,t){varn=arguments,a=t&&t.mdxType;if("string"==typeofe||a){varo=n.length,p=newArray(o);p[0]=m;vari={};for(varlint)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeofe?e:a,p[1]=i;for(varc=2;c<o;c++)p[c]=n[c];returnr.createElement.apply(null,p)}returnr.createElement.apply(null,n)}m.displayName="MDXCreateElement"},70535:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>p,metadata:()=>l,toc:()=>u});n(67294);varr=n(3905);functiona(){returna=Object.assign||function(e){for(vart=1;t<arguments.length;t++){varn=arguments[t];for(varrinn)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}returne},a.apply(this,arguments)}functiono(e,t){if(null==e)return{};varn,r,a=function(e,t){if(null==e)return{};varn,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);returna}(e,t);if(Object.getOwnPropertySymbols){varo=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}returna}constp={sidebar_label:"Page.exposeFunction"},i="Page.exposeFunction() method",l={unversionedId:"api/puppeteer.page.exposefunction",id:"version-20.7.3/api/puppeteer.page.exposefunction",title:"Page.exposeFunction() method",description:"The method adds a function called name on the page's window object. When called, the function executes puppeteerFunction in node.js and returns a Promise which resolves to the return value of puppeteerFunction.",source:"@site/versioned_docs/version-20.7.3/api/puppeteer.page.exposefunction.md",sourceDirName:"api",slug:"/api/puppeteer.page.exposefunction",permalink:"/api/puppeteer.page.exposefunction",draft:!1,tags:[],version:"20.7.3",frontMatter:{sidebar_label:"Page.exposeFunction"},sidebar:"api",previous:{title:"Page.evaluateOnNewDocument",permalink:"/api/puppeteer.page.evaluateonnewdocument"},next:{title:"Page.focus",permalink:"/api/puppeteer.page.focus"}},c={},u=[{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}],s={toc:u};functionm(e){var{components:t}=e,n=o(e,["components"]);return(0,r.kt)("wrapp