puppeteer/assets/js/779a1e5b.7c5cf0ea.js

2 lines
5.1 KiB
JavaScript
Raw Normal View History

/*! For license information please see 779a1e5b.7c5cf0ea.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[34002],{59857:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>i,contentTitle:()=>o,default:()=>l,frontMatter:()=>n,metadata:()=>h,toc:()=>d});var r=t(85893),c=t(11151);const n={sidebar_label:"Touchscreen"},o="Touchscreen class",h={id:"api/puppeteer.touchscreen",title:"Touchscreen class",description:"The Touchscreen class exposes touchscreen events.",source:"@site/versioned_docs/version-22.8.2/api/puppeteer.touchscreen.md",sourceDirName:"api",slug:"/api/puppeteer.touchscreen",permalink:"/api/puppeteer.touchscreen",draft:!1,unlisted:!1,tags:[],version:"22.8.2",frontMatter:{sidebar_label:"Touchscreen"},sidebar:"api",previous:{title:"Mouse.wheel",permalink:"/api/puppeteer.mouse.wheel"},next:{title:"Touchscreen.tap",permalink:"/api/puppeteer.touchscreen.tap"}},i={},d=[{value:"Signature:",id:"signature",level:4},{value:"Remarks",id:"remarks",level:2},{value:"Methods",id:"methods",level:2}];function a(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,c.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"touchscreen-class",children:"Touchscreen class"}),"\n",(0,r.jsx)(s.p,{children:"The Touchscreen class exposes touchscreen events."}),"\n",(0,r.jsx)(s.h4,{id:"signature",children:"Signature:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",children:"export declare abstract class Touchscreen\n"})}),"\n",(0,r.jsx)(s.h2,{id:"remarks",children:"Remarks"}),"\n",(0,r.jsxs)(s.p,{children:["The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ",(0,r.jsx)(s.code,{children:"Touchscreen"})," class."]}),"\n",(0,r.jsx)(s.h2,{id:"methods",children:"Methods"}),"\n",(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Method"})}),(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Modifiers"})}),(0,r.jsx)("th",{children:(0,r.jsx)(s.p,{children:"Description"})})]})}),(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"tap",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.touchscreen.tap",children:"tap(x, y)"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsxs)(s.p,{children:["Dispatches a ",(0,r.jsx)(s.code,{children:"touchstart"})," and ",(0,r.jsx)(s.code,{children:"touchend"})," event."]})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"touchend",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.touchscreen.touchend",children:"touchEnd()"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsxs)(s.p,{children:["Dispatches a ",(0,r.jsx)(s.code,{children:"touchend"})," event."]})})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"touchmove",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.touchscreen.touchmove",children:"touchMove(x, y)"})})}),(0,r.jsx)("td",{}),(0,r.jsxs)("td",{children:[(0,r.jsxs)(s.p,{children:["Dispatches a ",(0,r.jsx)(s.code,{children:"touchMove"})," event."]}),(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Remarks:"})}),(0,r.jsxs)(s.p,{children:["Not every ",(0,r.jsx)(s.code,{children:"touchMove"})," call results in a ",(0,r.jsx)(s.code,{children:"touchmove"})," event being emitted, depending on the browser's optimizations. For example, Chrome ",(0,r.jsx)(s.a,{href:"https://developer.chrome.com/blog/a-more-compatible-smoother-touch/#chromes-new-model-the-throttled-async-touchmove-model",children:"throttles"})," touch move events."]})]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)("span",{id:"touchstart",children:(0,r.jsx)(s.a,{href:"/api/puppeteer.touchscreen.touchstart",children:"touchStart(x, y)"})})}),(0,r.jsx)("td",{}),(0,r.jsx)("td",{children:(0,r.jsxs)(s.p,{children:["Dispatches a ",(0,r.jsx)(s.code,{children:"touchstart"})," event."]})})]})]})]})]})}function l(e={}){const{wrapper:s}={...(0,c.a)(),...e.components};return s?(0,r.jsx)(s,{...e,chi