mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2 lines
3.5 KiB
JavaScript
2 lines
3.5 KiB
JavaScript
/*! For license information please see b7824bea.96d34794.js.LICENSE.txt */
|
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3847],{20134:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>n,metadata:()=>s,toc:()=>i});var a=r(85893),o=r(11151);const n={sidebar_label:"Locator.race"},c="Locator.race() method",s={id:"api/puppeteer.locator.race",title:"Locator.race() method",description:"Creates a race between multiple locators but ensures that only a single one acts.",source:"@site/../docs/api/puppeteer.locator.race.md",sourceDirName:"api",slug:"/api/puppeteer.locator.race",permalink:"/next/api/puppeteer.locator.race",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Locator.race"},sidebar:"api",previous:{title:"Locator.map",permalink:"/next/api/puppeteer.locator.map"},next:{title:"Locator.scroll",permalink:"/next/api/puppeteer.locator.scroll"}},l={},i=[{value:"Signature:",id:"signature",level:4},{value:"Parameters",id:"parameters",level:2}];function p(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h1,{id:"locatorrace-method",children:"Locator.race() method"}),"\n",(0,a.jsx)(t.p,{children:"Creates a race between multiple locators but ensures that only a single one acts."}),"\n",(0,a.jsx)(t.h4,{id:"signature",children:"Signature:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",children:"class Locator {\n static race<Locators extends readonly unknown[] | []>(\n locators: Locators\n ): Locator<AwaitedLocator<Locators[number]>>;\n}\n"})}),"\n",(0,a.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{children:"Parameter"}),(0,a.jsx)(t.th,{children:"Type"}),(0,a.jsx)(t.th,{children:"Description"})]})}),(0,a.jsx)(t.tbody,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{children:"locators"}),(0,a.jsx)(t.td,{children:"Locators"}),(0,a.jsx)(t.td,{})]})})]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Returns:"})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.a,{href:"/next/api/puppeteer.locator",children:"Locator"}),"<",(0,a.jsx)(t.a,{href:"/next/api/puppeteer.awaitedlocator",children:"AwaitedLocator"}),"<Locators[number]>>"]})]})}function d(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},75251:(e,t,r)=>{var a=r(67294),o=Symbol.for("react.element"),n=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,s=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function i(e,t,r){var a,n={},i=null,p=null;for(a in void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(p=t.ref),t)c.call(t,a)&&!l.hasOwnProperty(a)&&(n[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===n[a]&&(n[a]=t[a]);return{$$typeof:o,type:e,key:i,ref:p,props:n,_owner:s.current}}t.Fragment=n,t.jsx=i,t.jsxs=i},85893:(e,t,r)=>{e.exports=r(75251)},11151:(e,t,r)=>{r.d(t,{Z:()=>s,a:()=>c});var a=r(67294);const o={},n=a.createContext(o);function c(e){const t=a.useContext(n);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),a.createElement(n.Provider,{value:t},e.children)}}}]); |