"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[67999],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>d});vara=n(67294);functionr(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){vara=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}returnn}functionl(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(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,a,r=function(e,t){if(null==e)return{};varn,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);returnr}(e,t);if(Object.getOwnPropertySymbols){varo=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}returnr}varp=a.createContext({}),u=function(e){vart=a.useContext(p),n=t;returne&&(n="function"==typeofe?e(t):l(l({},t),e)),n},c=function(e){vart=u(e.components);returna.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){vart=e.children;returna.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){varn=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=u(n),d=r,g=m["".concat(p,".").concat(d)]||m[d]||s[d]||o;returnn?a.createElement(g,l(l({ref:t},c),{},{components:n})):a.createElement(g,l({ref:t},c))}));functiond(e,t){varn=arguments,r=t&&t.mdxType;if("string"==typeofe||r){varo=n.length,l=newArray(o);l[0]=m;vari={};for(varpint)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i.mdxType="string"==typeofe?e:r,l[1]=i;for(varu=2;u<o;u++)l[u]=n[u];returna.createElement.apply(null,l)}returna.createElement.apply(null,n)}m.displayName="MDXCreateElement"},98003:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>p,toc:()=>c});n(67294);vara=n(3905);functionr(){returnr=Object.assign||function(e){for(vart=1;t<arguments.length;t++){varn=arguments[t];for(varainn)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}returne},r.apply(this,arguments)}functiono(e,t){if(null==e)return{};varn,a,r=function(e,t){if(null==e)return{};varn,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);returnr}(e,t);if(Object.getOwnPropertySymbols){varo=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}returnr}constl={sidebar_label:"Page.evaluateOnNewDocument"},i="Page.evaluateOnNewDocument() method",p={unversionedId:"api/puppeteer.page.evaluateonnewdocument",id:"api/puppeteer.page.evaluateonnewdocument",title:"Page.evaluateOnNewDocument() method",description:"Adds a function which would be invoked in one of the following scenarios:",source:"@site/../docs/api/puppeteer.page.evaluateonnewdocument.md",sourceDirName:"api",slug:"/api/puppeteer.page.evaluateonnewdocument",permalink:"/next/api/puppeteer.page.evaluateonnewdocument",draft:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Page.evaluateOnNewDocument"},sidebar:"api",previous:{title:"Page.evaluateHandle",permalink:"/next/api/puppeteer.page.evaluatehandle"},next:{title:"Page.exposeFunction",permalink:"/next/api/puppeteer.page.exposefunction"}},u={},c=[{value:"Signature:",id:"signature",level:4},{value:"Parameters",id:"parameters",level:2},{value:"Example",id:"example",level:2}],s={toc:c};functionm(e){var{components:t}=e,n=o(e,["components"]);return(0,a.kt)("wrapper",r({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",r({},{id:"pageevaluateonnewdocument-method"}),"Page.evaluateOnNewDocument()