puppeteer/assets/js/c2bc8ccd.fe5c47d6.js
2021-10-07 15:21:45 +00:00

1 line
5.1 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[23077],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return d}});var r=n(67294);function p(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 a(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){p(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 o(e,t){if(null==e)return{};var n,r,p=function(e,t){if(null==e)return{};var n,r,p={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(p[n]=e[n]);return p}(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)&&(p[n]=e[n])}return p}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,p=e.mdxType,i=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),m=u(n),d=p,f=m["".concat(l,".").concat(d)]||m[d]||s[d]||i;return n?r.createElement(f,a(a({ref:t},c),{},{components:n})):r.createElement(f,a({ref:t},c))}));function d(e,t){var n=arguments,p=t&&t.mdxType;if("string"==typeof e||p){var i=n.length,a=new Array(i);a[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:p,a[1]=o;for(var u=2;u<i;u++)a[u]=n[u];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}m.displayName="MDXCreateElement"},11659:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return o},contentTitle:function(){return l},metadata:function(){return u},toc:function(){return c},default:function(){return m}});var r=n(87462),p=n(63366),i=(n(67294),n(3905)),a=["components"],o={},l=void 0,u={unversionedId:"puppeteer.elementhandle.isintersectingviewport",id:"puppeteer.elementhandle.isintersectingviewport",isDocsHomePage:!1,title:"puppeteer.elementhandle.isintersectingviewport",description:"Home &gt; puppeteer &gt; ElementHandle &gt; isIntersectingViewport",source:"@site/docs/puppeteer.elementhandle.isintersectingviewport.md",sourceDirName:".",slug:"/puppeteer.elementhandle.isintersectingviewport",permalink:"/puppeteer/docs/next/puppeteer.elementhandle.isintersectingviewport",editUrl:"https://github.com/facebook/puppeteer/edit/main/website/docs/puppeteer.elementhandle.isintersectingviewport.md",version:"current",frontMatter:{},sidebar:"docs",previous:{title:"puppeteer.elementhandle.drop",permalink:"/puppeteer/docs/next/puppeteer.elementhandle.drop"},next:{title:"puppeteer.elementhandle.press",permalink:"/puppeteer/docs/next/puppeteer.elementhandle.press"}},c=[{value:"ElementHandle.isIntersectingViewport() method",id:"elementhandleisintersectingviewport-method",children:[]},{value:"Parameters",id:"parameters",children:[]}],s={toc:c};function m(e){var t=e.components,n=(0,p.Z)(e,a);return(0,i.kt)("wrapper",(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/index"},"Home")," ",">"," ",(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/puppeteer"},"puppeteer")," ",">"," ",(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/puppeteer.elementhandle"},"ElementHandle")," ",">"," ",(0,i.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/puppeteer.elementhandle.isintersectingviewport"},"isIntersectingViewport")),(0,i.kt)("h2",{id:"elementhandleisintersectingviewport-method"},"ElementHandle.isIntersectingViewport() method"),(0,i.kt)("p",null,"Resolves to true if the element is visible in the current viewport."),(0,i.kt)("b",null,"Signature:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-typescript"},"isIntersectingViewport(options?: {\n threshold?: number;\n }): Promise<boolean>;\n")),(0,i.kt)("h2",{id:"parameters"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,i.kt)("th",{parentName:"tr",align:null},"Type"),(0,i.kt)("th",{parentName:"tr",align:null},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"options"),(0,i.kt)("td",{parentName:"tr",align:null},"{ threshold?: number; }"),(0,i.kt)("td",{parentName:"tr",align:null})))),(0,i.kt)("b",null,"Returns:"),(0,i.kt)("p",null,"Promise","<","boolean",">"))}m.isMDXComponent=!0}}]);