mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
/*! For license information please see 951153ce.45734688.js.LICENSE.txt */
|
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[24490],{19843:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>c,default:()=>l,frontMatter:()=>s,metadata:()=>o,toc:()=>a});var i=r(85893),n=r(11151);const s={sidebar_label:"DeviceRequestPrompt.waitForDevice"},c="DeviceRequestPrompt.waitForDevice() method",o={id:"api/puppeteer.devicerequestprompt.waitfordevice",title:"DeviceRequestPrompt.waitForDevice() method",description:"Resolve to the first device in the prompt matching a filter.",source:"@site/../docs/api/puppeteer.devicerequestprompt.waitfordevice.md",sourceDirName:"api",slug:"/api/puppeteer.devicerequestprompt.waitfordevice",permalink:"/next/api/puppeteer.devicerequestprompt.waitfordevice",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"DeviceRequestPrompt.waitForDevice"},sidebar:"api",previous:{title:"DeviceRequestPrompt.select",permalink:"/next/api/puppeteer.devicerequestprompt.select"},next:{title:"DeviceRequestPromptDevice",permalink:"/next/api/puppeteer.devicerequestpromptdevice"}},p={},a=[{value:"Signature:",id:"signature",level:4},{value:"Parameters",id:"parameters",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,n.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"devicerequestpromptwaitfordevice-method",children:"DeviceRequestPrompt.waitForDevice() method"}),"\n",(0,i.jsx)(t.p,{children:"Resolve to the first device in the prompt matching a filter."}),"\n",(0,i.jsx)(t.h4,{id:"signature",children:"Signature:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-typescript",children:"class DeviceRequestPrompt {\n waitForDevice(\n filter: (device: DeviceRequestPromptDevice) => boolean,\n options?: WaitTimeoutOptions\n ): Promise<DeviceRequestPromptDevice>;\n}\n"})}),"\n",(0,i.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,i.jsxs)("table",{children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:(0,i.jsx)(t.p,{children:"Parameter"})}),(0,i.jsx)("th",{children:(0,i.jsx)(t.p,{children:"Type"})}),(0,i.jsx)("th",{children:(0,i.jsx)(t.p,{children:"Description"})})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(t.p,{children:"filter"})}),(0,i.jsx)("td",{children:(0,i.jsxs)(t.p,{children:["(device: ",(0,i.jsx)(t.a,{href:"/next/api/puppeteer.devicerequestpromptdevice",children:"DeviceRequestPromptDevice"}),") => boolean"]})}),(0,i.jsx)("td",{})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,i.jsx)(t.p,{children:"options"})}),(0,i.jsx)("td",{children:(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"/next/api/puppeteer.waittimeoutoptions",children:"WaitTimeoutOptions"})})}),(0,i.jsx)("td",{children:(0,i.jsx)(t.p,{children:(0,i.jsx)(t.em,{children:"(Optional)"})})})]})]})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Returns:"})}),"\n",(0,i.jsxs)(t.p,{children:["Promise<",(0,i.jsx)(t.a,{href:"/next/api/puppeteer.devicerequestpromptdevice",children:"DeviceRequestPromptDevice"}),">"]})]})}function l(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},75251:(e,t,r)=>{var i=r(67294),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,r){var i,s={},a=null,d=null;for(i in void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(d=t.ref),t)c.call(t,i)&&!p.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===s[i]&&(s[i]=t[i]);return{$$typeof:n,type:e,key:a,ref:d,props:s,_owner:o.current}}t.Fragment=s,t.jsx=a,t.jsxs=a},85893:(e,t,r)=>{e.exports=r(75251)},11151:(e,t,r)=>{r.d(t,{Z:()=>o,a:()=>c});var i=r(67294);const n={},s=i.createContext(n);function c(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); |