puppeteer/assets/js/0a718780.f1a5ab92.js

2 lines
6.1 KiB
JavaScript
Raw Normal View History

/*! For license information please see 0a718780.f1a5ab92.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[48954],{47485:(e,i,r)=>{r.r(i),r.d(i,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>n,metadata:()=>c,toc:()=>o});var t=r(85893),s=r(11151);const n={sidebar_label:"Viewport"},d="Viewport interface",c={id:"api/puppeteer.viewport",title:"Viewport interface",description:"Signature:",source:"@site/../docs/api/puppeteer.viewport.md",sourceDirName:"api",slug:"/api/puppeteer.viewport",permalink:"/next/api/puppeteer.viewport",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Viewport"},sidebar:"api",previous:{title:"UnsupportedOperation",permalink:"/next/api/puppeteer.unsupportedoperation"},next:{title:"VisibilityOption",permalink:"/next/api/puppeteer.visibilityoption"}},l={},o=[{value:"Signature:",id:"signature",level:4},{value:"Properties",id:"properties",level:2}];function h(e){const i={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.h1,{id:"viewport-interface",children:"Viewport interface"}),"\n",(0,t.jsx)(i.h4,{id:"signature",children:"Signature:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-typescript",children:"export interface Viewport\n"})}),"\n",(0,t.jsx)(i.h2,{id:"properties",children:"Properties"}),"\n",(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:(0,t.jsx)(i.p,{children:"Property"})}),(0,t.jsx)("th",{children:(0,t.jsx)(i.p,{children:"Modifiers"})}),(0,t.jsx)("th",{children:(0,t.jsx)(i.p,{children:"Type"})}),(0,t.jsx)("th",{children:(0,t.jsx)(i.p,{children:"Description"})}),(0,t.jsx)("th",{children:(0,t.jsx)(i.p,{children:"Default"})})]})}),(0,t.jsxs)("tbody",{children:[(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)("span",{id:"devicescalefactor",children:"deviceScaleFactor"})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:(0,t.jsx)(i.code,{children:"optional"})})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:"number"})}),(0,t.jsxs)("td",{children:[(0,t.jsxs)(i.p,{children:["Specify device scale factor. See ",(0,t.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio",children:"devicePixelRatio"})," for more info."]}),(0,t.jsx)(i.p,{children:(0,t.jsx)(i.strong,{children:"Remarks:"})}),(0,t.jsxs)(i.p,{children:["Setting this value to ",(0,t.jsx)(i.code,{children:"0"})," will reset this value to the system default."]})]}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:(0,t.jsx)(i.code,{children:"1"})})})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)("span",{id:"hastouch",children:"hasTouch"})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:(0,t.jsx)(i.code,{children:"optional"})})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:"boolean"})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:"Specify if the viewport supports touch events."})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:(0,t.jsx)(i.code,{children:"false"})})})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)("span",{id:"height",children:"height"})}),(0,t.jsx)("td",{}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:"number"})}),(0,t.jsxs)("td",{children:[(0,t.jsx)(i.p,{children:"The page height in CSS pixels."}),(0,t.jsx)(i.p,{children:(0,t.jsx)(i.strong,{children:"Remarks:"})}),(0,t.jsxs)(i.p,{children:["Setting this value to ",(0,t.jsx)(i.code,{children:"0"})," will reset this value to the system default."]})]}),(0,t.jsx)("td",{})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:(0,t.jsx)("span",{id:"islandscape",children:"isLandscape"})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:(0,t.jsx)(i.code,{children:"optional"})})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:"boolean"})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:"Specifies if the viewport is in landscape mode."})}),(0,t.jsx)("td",{children:(0,t.jsx)(i.p,{children:(0,t.jsx)(i.code,{children:"false"})})})]}),(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{chil