puppeteer/assets/js/2587b55b.ad74d064.js

2 lines
3.7 KiB
JavaScript
Raw Normal View History

/*! For license information please see 2587b55b.ad74d064.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[62791],{65431:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>c,frontMatter:()=>s,metadata:()=>l,toc:()=>o});var r=n(85893),a=n(11151);const s={sidebar_label:"JSHandle.evaluate"},i="JSHandle.evaluate() method",l={id:"api/puppeteer.jshandle.evaluate",title:"JSHandle.evaluate() method",description:"Evaluates the given function with the current handle as its first argument.",source:"@site/versioned_docs/version-21.6.1/api/puppeteer.jshandle.evaluate.md",sourceDirName:"api",slug:"/api/puppeteer.jshandle.evaluate",permalink:"/api/puppeteer.jshandle.evaluate",draft:!1,unlisted:!1,tags:[],version:"21.6.1",frontMatter:{sidebar_label:"JSHandle.evaluate"},sidebar:"api",previous:{title:"JSHandle.dispose",permalink:"/api/puppeteer.jshandle.dispose"},next:{title:"JSHandle.evaluateHandle",permalink:"/api/puppeteer.jshandle.evaluatehandle"}},d={},o=[{value:"Signature:",id:"signature",level:4},{value:"Parameters",id:"parameters",level:2}];function u(e){const t={code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"jshandleevaluate-method",children:"JSHandle.evaluate() method"}),"\n",(0,r.jsx)(t.p,{children:"Evaluates the given function with the current handle as its first argument."}),"\n",(0,r.jsx)(t.h4,{id:"signature",children:"Signature:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-typescript",children:"class JSHandle {\n evaluate<\n Params extends unknown[],\n Func extends EvaluateFuncWith<T, Params> = EvaluateFuncWith<T, Params>,\n >(\n pageFunction: Func | string,\n ...args: Params\n ): Promise<Awaited<ReturnType<Func>>>;\n}\n"})}),"\n",(0,r.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"pageFunction"}),(0,r.jsx)(t.td,{children:"Func | string"}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"args"}),(0,r.jsx)(t.td,{children:"Params"}),(0,r.jsx)(t.td,{})]})]})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Returns:"})}),"\n",(0,r.jsx)(t.p,{children:"Promise<Awaited<ReturnType<Func>>>"})]})}function c(e={}){const{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},75251:(e,t,n)=>{var r=n(67294),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function o(e,t,n){var r,s={},o=null,u=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!d.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:a,type:e,key:o,ref:u,props:s,_owner:l.current}}t.Fragment=s,t.jsx=o,t.jsxs=o},85893:(e,t,n)=>{e.exports=n(75251)},11151:(e,t,n)=>{n.d(t,{Z:()=>l,a:()=>i});var r=n(67294);const a={},s=r.createContext(a);function i(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]);