"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[20276],{3905:(t,e,n)=>{n.d(e,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var p=r.createContext({}),u=function(t){var e=r.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):i(i({},e),t)),n},c=function(t){var e=u(t.components);return r.createElement(p.Provider,{value:e},t.children)},s={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},m=r.forwardRef((function(t,e){var n=t.components,a=t.mdxType,o=t.originalType,p=t.parentName,c=l(t,["components","mdxType","originalType","parentName"]),m=u(n),f=a,d=m["".concat(p,".").concat(f)]||m[f]||s[f]||o;return n?r.createElement(d,i(i({ref:e},c),{},{components:n})):r.createElement(d,i({ref:e},c))}));function f(t,e){var n=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var o=n.length,i=new Array(o);i[0]=m;var l={};for(var p in e)hasOwnProperty.call(e,p)&&(l[p]=e[p]);l.originalType=t,l.mdxType="string"==typeof t?t:a,i[1]=l;for(var u=2;u{n.r(e),n.d(e,{assets:()=>u,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>p,toc:()=>c});n(67294);var r=n(3905);function a(){return a=Object.assign||function(t){for(var e=1;e=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}const i={sidebar_label:"FrameWaitForFunctionOptions"},l="FrameWaitForFunctionOptions interface",p={unversionedId:"api/puppeteer.framewaitforfunctionoptions",id:"api/puppeteer.framewaitforfunctionoptions",title:"FrameWaitForFunctionOptions interface",description:"Signature:",source:"@site/../docs/api/puppeteer.framewaitforfunctionoptions.md",sourceDirName:"api",slug:"/api/puppeteer.framewaitforfunctionoptions",permalink:"/next/api/puppeteer.framewaitforfunctionoptions",draft:!1,tags:[],version:"current",frontMatter:{sidebar_label:"FrameWaitForFunctionOptions"},sidebar:"api",previous:{title:"FrameEvents",permalink:"/next/api/puppeteer.frameevents"},next:{title:"GeolocationOptions",permalink:"/next/api/puppeteer.geolocationoptions"}},u={},c=[{value:"Signature:",id:"signature",level:4},{value:"Properties",id:"properties",level:2}],s={toc:c};function m(t){var{components:e}=t,n=o(t,["components"]);return(0,r.kt)("wrapper",a({},s,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h1",a({},{id:"framewaitforfunctionoptions-interface"}),"FrameWaitForFunctionOptions interface"),(0,r.kt)("h4",a({},{id:"signature"}),"Signature:"),(0,r.kt)("pre",null,(0,r.kt)("code",a({parentName:"pre"},{className:"language-typescript"}),"export interface FrameWaitForFunctionOptions\n")),(0,r.kt)("h2",a({},{id:"properties"}),"Properties"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",a({parentName:"tr"},{align:null}),"Property"),(0,r.kt)("th",a({parentName:"tr"},{align:null}),"Modifiers"),(0,r.kt)("th",a({parentName:"tr"},{align:null}),"Type"),(0,r.kt)("th",a({parentName:"tr"},{align:null}),"Description"),(0,r.kt)("th",a({parentName:"tr"},{align:null}),"Default"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",a({parentName:"tr"},{align:null}),"polling"),(0,r.kt)("td",a({parentName:"tr"},{align:null}),(0,r.kt)("code",null,"optional")),(0,r.kt)("td",a({parentName:"tr"},{align:null}),"'raf' ","|"," 'mutation' ","|"," number"),(0,r.kt)("td",a({parentName:"tr"},{align:null}),(0,r.kt)("p",null,"An interval at which the ",(0,r.kt)("code",null,"pageFunction")," is executed, defaults to ",(0,r.kt)("code",null,"raf"),". If ",(0,r.kt)("code",null,"polling")," is a number, then it is treated as an interval in milliseconds at which the function would be executed. If ",(0,r.kt)("code",null,"polling")," is a string, then it can be one of the following values:"),(0,r.kt)("p",null,"- ",(0,r.kt)("code",null,"raf")," - to constantly execute ",(0,r.kt)("code",null,"pageFunction")," in ",(0,r.kt)("code",null,"requestAnimationFrame")," callback. This is the tightest polling mode which is suitable to observe styling changes."),(0,r.kt)("p",null,"- ",(0,r.kt)("code",null,"mutation")," - to execute ",(0,r.kt)("code",null,"pageFunction")," on every DOM mutation.")),(0,r.kt)("td",a({parentName:"tr"},{align:null}))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",a({parentName:"tr"},{align:null}),"signal"),(0,r.kt)("td",a({parentName:"tr"},{align:null}),(0,r.kt)("code",null,"optional")),(0,r.kt)("td",a({parentName:"tr"},{align:null}),"AbortSignal"),(0,r.kt)("td",a({parentName:"tr"},{align:null}),"A signal object that allows you to cancel a waitForFunction call."),(0,r.kt)("td",a({parentName:"tr"},{align:null}))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",a({parentName:"tr"},{align:null}),"timeout"),(0,r.kt)("td",a({parentName:"tr"},{align:null}),(0,r.kt)("code",null,"optional")),(0,r.kt)("td",a({parentName:"tr"},{align:null}),"number"),(0,r.kt)("td",a({parentName:"tr"},{align:null}),"Maximum time to wait in milliseconds. Defaults to ",(0,r.kt)("code",null,"30000")," (30 seconds). Pass ",(0,r.kt)("code",null,"0")," to disable the timeout. Puppeteer's default timeout can be changed using ",(0,r.kt)("a",a({parentName:"td"},{href:"/next/api/puppeteer.page.setdefaulttimeout"}),"Page.setDefaultTimeout()"),"."),(0,r.kt)("td",a({parentName:"tr"},{align:null}))))))}m.isMDXComponent=!0}}]);