puppeteer/assets/js/73caa519.067d3777.js
release-please[bot] d5d4bf3f0e deploy: 75f170b26d
2024-04-11 16:53:35 +00:00

2 lines
5.5 KiB
JavaScript

/*! For license information please see 73caa519.067d3777.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[19842],{67387:(e,i,r)=>{r.r(i),r.d(i,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>o});var n=r(85893),t=r(11151);const s={sidebar_label:"Viewport"},d="Viewport interface",c={id:"api/puppeteer.viewport",title:"Viewport interface",description:"Signature:",source:"@site/versioned_docs/version-22.6.4/api/puppeteer.viewport.md",sourceDirName:"api",slug:"/api/puppeteer.viewport",permalink:"/api/puppeteer.viewport",draft:!1,unlisted:!1,tags:[],version:"22.6.4",frontMatter:{sidebar_label:"Viewport"},sidebar:"api",previous:{title:"UnsupportedOperation",permalink:"/api/puppeteer.unsupportedoperation"},next:{title:"VisibilityOption",permalink:"/api/puppeteer.visibilityoption"}},l={},o=[{value:"Signature:",id:"signature",level:4},{value:"Properties",id:"properties",level:2}];function p(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,t.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.h1,{id:"viewport-interface",children:"Viewport interface"}),"\n",(0,n.jsx)(i.h4,{id:"signature",children:"Signature:"}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-typescript",children:"export interface Viewport\n"})}),"\n",(0,n.jsx)(i.h2,{id:"properties",children:"Properties"}),"\n",(0,n.jsxs)("table",{children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:(0,n.jsx)(i.p,{children:"Property"})}),(0,n.jsx)("th",{children:(0,n.jsx)(i.p,{children:"Modifiers"})}),(0,n.jsx)("th",{children:(0,n.jsx)(i.p,{children:"Type"})}),(0,n.jsx)("th",{children:(0,n.jsx)(i.p,{children:"Description"})}),(0,n.jsx)("th",{children:(0,n.jsx)(i.p,{children:"Default"})})]})}),(0,n.jsxs)("tbody",{children:[(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsx)("span",{id:"devicescalefactor",children:"deviceScaleFactor"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"optional"})})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"number"})}),(0,n.jsx)("td",{children:(0,n.jsxs)(i.p,{children:["Specify device scale factor. See ",(0,n.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio",children:"devicePixelRatio"})," for more info."]})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"1"})})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsx)("span",{id:"hastouch",children:"hasTouch"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"optional"})})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"boolean"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"Specify if the viewport supports touch events."})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"false"})})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsx)("span",{id:"height",children:"height"})}),(0,n.jsx)("td",{}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"number"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"The page height in CSS pixels."})}),(0,n.jsx)("td",{})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsx)("span",{id:"islandscape",children:"isLandscape"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"optional"})})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"boolean"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"Specifies if the viewport is in landscape mode."})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"false"})})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsx)("span",{id:"ismobile",children:"isMobile"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"optional"})})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"boolean"})}),(0,n.jsx)("td",{children:(0,n.jsxs)(i.p,{children:["Whether the ",(0,n.jsx)(i.code,{children:"meta viewport"})," tag is taken into account."]})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:(0,n.jsx)(i.code,{children:"false"})})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsx)("span",{id:"width",children:"width"})}),(0,n.jsx)("td",{}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"number"})}),(0,n.jsx)("td",{children:(0,n.jsx)(i.p,{children:"The page width in CSS pixels."})}),(0,n.jsx)("td",{})]})]})]})]})}function h(e={}){const{wrapper:i}={...(0,t.a)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},75251:(e,i,r)=>{var n=r(67294),t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function o(e,i,r){var n,s={},o=null,p=null;for(n in void 0!==r&&(o=""+r),void 0!==i.key&&(o=""+i.key),void 0!==i.ref&&(p=i.ref),i)d.call(i,n)&&!l.hasOwnProperty(n)&&(s[n]=i[n]);if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===s[n]&&(s[n]=i[n]);return{$$typeof:t,type:e,key:o,ref:p,props:s,_owner:c.current}}i.Fragment=s,i.jsx=o,i.jsxs=o},85893:(e,i,r)=>{e.exports=r(75251)},11151:(e,i,r)=>{r.d(i,{Z:()=>c,a:()=>d});var n=r(67294);const t={},s=n.createContext(t);function d(e){const i=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function c(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),n.createElement(s.Provider,{value:i},e.children)}}}]);