<titledata-rh="true">WebWorker.evaluate() method | Puppeteer</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://pptr.dev/api/puppeteer.webworker.evaluate"><metadata-rh="true"name="docusaurus_locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docusaurus_version"content="19.2.0"><metadata-rh="true"name="docusaurus_tag"content="docs-default-19.2.0"><metadata-rh="true"name="docsearch:version"content="19.2.0"><metadata-rh="true"name="docsearch:docusaurus_tag"content="docs-default-19.2.0"><metadata-rh="true"property="og:title"content="WebWorker.evaluate() method | Puppeteer"><metadata-rh="true"name="description"content="If the function passed to the worker.evaluate returns a Promise, then worker.evaluate would wait for the promise to resolve and return its value. If the function passed to the worker.evaluate returns a non-serializable value, then worker.evaluate resolves to undefined. DevTools Protocol also supports transferring some additional values that are not serializable by JSON: -0, NaN, Infinity, -Infinity, and bigint literals. Shortcut for await worker.executionContext()).evaluate(pageFunction, ...args)."><metadata-rh="true"property="og:description"content="If the function passed to the worker.evaluate returns a Promise, then worker.evaluate would wait for the promise to resolve and return its value. If the function passed to the worker.evaluate returns a non-serializable value, then worker.evaluate resolves to undefined. DevTools Protocol also supports transferring some additional values that are not serializable by JSON: -0, NaN, Infinity, -Infinity, and bigint literals. Shortcut for await worker.executionContext()).evaluate(pageFunction, ...args)."><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://pptr.dev/api/puppeteer.webworker.evaluate"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/api/puppeteer.webworker.evaluate"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/api/puppeteer.webworker.evaluate"hreflang="x-default"><linkrel="stylesheet"href="/assets/css/styles.3247e0f2.css">