puppeteer/assets/js/3f1732bd.ea4374de.js
2021-10-07 15:21:45 +00:00

1 line
5.1 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[12942],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,c=a(e,["components","mdxType","originalType","parentName"]),s=u(n),m=o,d=s["".concat(l,".").concat(m)]||s[m]||f[m]||i;return n?r.createElement(d,p(p({ref:t},c),{},{components:n})):r.createElement(d,p({ref:t},c))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,p=new Array(i);p[0]=s;var a={};for(var l in t)hasOwnProperty.call(t,l)&&(a[l]=t[l]);a.originalType=e,a.mdxType="string"==typeof e?e:o,p[1]=a;for(var u=2;u<i;u++)p[u]=n[u];return r.createElement.apply(null,p)}return r.createElement.apply(null,n)}s.displayName="MDXCreateElement"},10014:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return a},contentTitle:function(){return l},metadata:function(){return u},toc:function(){return c},default:function(){return s}});var r=n(87462),o=n(63366),i=(n(67294),n(3905)),p=["components"],a={},l=void 0,u={unversionedId:"puppeteer.framewaitforfunctionoptions.polling",id:"version-10.1.0/puppeteer.framewaitforfunctionoptions.polling",isDocsHomePage:!1,title:"puppeteer.framewaitforfunctionoptions.polling",description:"Home &gt; puppeteer &gt; FrameWaitForFunctionOptions &gt; polling",source:"@site/versioned_docs/version-10.1.0/puppeteer.framewaitforfunctionoptions.polling.md",sourceDirName:".",slug:"/puppeteer.framewaitforfunctionoptions.polling",permalink:"/puppeteer/docs/puppeteer.framewaitforfunctionoptions.polling",editUrl:"https://github.com/facebook/puppeteer/edit/main/website/versioned_docs/version-10.1.0/puppeteer.framewaitforfunctionoptions.polling.md",version:"10.1.0",frontMatter:{}},c=[{value:"FrameWaitForFunctionOptions.polling property",id:"framewaitforfunctionoptionspolling-property",children:[]}],f={toc:c};function s(e){var t=e.components,n=(0,o.Z)(e,p);return(0,i.kt)("wrapper",(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/index"},"Home")," ",">"," ",(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/puppeteer"},"puppeteer")," ",">"," ",(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/puppeteer.framewaitforfunctionoptions"},"FrameWaitForFunctionOptions")," ",">"," ",(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/puppeteer.framewaitforfunctionoptions.polling"},"polling")),(0,i.kt)("h2",{id:"framewaitforfunctionoptionspolling-property"},"FrameWaitForFunctionOptions.polling property"),(0,i.kt)("p",null,"An interval at which the ",(0,i.kt)("inlineCode",{parentName:"p"},"pageFunction")," is executed, defaults to ",(0,i.kt)("inlineCode",{parentName:"p"},"raf"),". If ",(0,i.kt)("inlineCode",{parentName:"p"},"polling")," is a number, then it is treated as an interval in milliseconds at which the function would be executed. If ",(0,i.kt)("inlineCode",{parentName:"p"},"polling")," is a string, then it can be one of the following values:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"raf")," - to constantly execute ",(0,i.kt)("inlineCode",{parentName:"p"},"pageFunction")," in ",(0,i.kt)("inlineCode",{parentName:"p"},"requestAnimationFrame")," callback. This is the tightest polling mode which is suitable to observe styling changes.")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"mutation")," - to execute ",(0,i.kt)("inlineCode",{parentName:"p"},"pageFunction")," on every DOM mutation."))),(0,i.kt)("b",null,"Signature:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"polling?: string | number;\n")))}s.isMDXComponent=!0}}]);