mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
|
/*! For license information please see 04da07e9.fcb4af4a.js.LICENSE.txt */
|
||
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[20276],{35122:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var i=n(85893),r=n(11151);const o={sidebar_label:"FrameWaitForFunctionOptions"},s="FrameWaitForFunctionOptions interface",a={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,unlisted:!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"}},c={},l=[{value:"Signature:",id:"signature",level:4},{value:"Properties",id:"properties",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"framewaitforfunctionoptions-interface",children:"FrameWaitForFunctionOptions interface"}),"\n",(0,i.jsx)(t.h4,{id:"signature",children:"Signature:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",children:"export interface FrameWaitForFunctionOptions\n"})}),"\n",(0,i.jsx)(t.h2,{id:"properties",children:"Properties"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Property"}),(0,i.jsx)(t.th,{children:"Modifiers"}),(0,i.jsx)(t.th,{children:"Type"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Default"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"polling"}),(0,i.jsx)(t.td,{children:(0,i.jsx)("code",{children:"optional"})}),(0,i.jsx)(t.td,{children:"'raf' | 'mutation' | number"}),(0,i.jsxs)(t.td,{children:[(0,i.jsxs)("p",{children:["An interval at which the ",(0,i.jsx)("code",{children:"pageFunction"})," is executed, defaults to ",(0,i.jsx)("code",{children:"raf"}),". If ",(0,i.jsx)("code",{children:"polling"})," is a number, then it is treated as an interval in milliseconds at which the function would be executed. If ",(0,i.jsx)("code",{children:"polling"})," is a string, then it can be one of the following values:"]}),(0,i.jsxs)("p",{children:["- ",(0,i.jsx)("code",{children:"raf"})," - to constantly execute ",(0,i.jsx)("code",{children:"pageFunction"})," in ",(0,i.jsx)("code",{children:"requestAnimationFrame"})," callback. This is the tightest polling mode which is suitable to observe styling changes."]}),(0,i.jsxs)("p",{children:["- ",(0,i.jsx)("code",{children:"mutation"})," - to execute ",(0,i.jsx)("code",{children:"pageFunction"})," on every DOM mutation."]})]}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"signal"}),(0,i.jsx)(t.td,{children:(0,i.jsx)("code",{children:"optional"})}),(0,i.jsx)(t.td,{children:"AbortSignal"}),(0,i.jsx)(t.td,{children:"A signal object that allows you to cancel a waitForFunction call."}),(0,i.jsx)(t.td,{})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"timeout"}),(0,i.jsx)(t.td,{children:(0,i.jsx)("code",{children:"optional"})}),(0,i.jsx)(t.td,{children:"number"}),(0,i.jsxs)(t.td,{children:["Maximum time to wait in milliseconds. Defaults to ",(0,i.jsx)("code",{children:"30000"})," (30 seconds). Pass ",(0,i.jsx)("code",{children:"0"})," to disable the timeout. Puppeteer's default timeout can be changed using ",(0,i.jsx)(t.a,{href:"/next/api/puppeteer.page.setdefaulttimeout",children:"Page.setDefaultTimeout()"}),"."]}),(0,i.jsx)(t.td,{})]})]})]})]})}function p(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},75251:(e,t,n)=>{var i=n(67294),r=Symbol.for("react.element"),o=Symbol.for("react
|