@@ -60,15 +60,15 @@ export class Frame extends ChannelOwner<FrameChannel, FrameInitializer> {
6060 }
6161
6262 async goto ( url : string , options : GotoOptions = { } ) : Promise < network . Response | null > {
63- return Response . fromNullable ( await this . _channel . goto ( { url, options, isPage : this . _page ! . _isPageCall } ) ) ;
63+ return Response . fromNullable ( await this . _channel . goto ( { url, ... options , isPage : this . _page ! . _isPageCall } ) ) ;
6464 }
6565
6666 async waitForNavigation ( options : types . WaitForNavigationOptions = { } ) : Promise < network . Response | null > {
67- return Response . fromNullable ( await this . _channel . waitForNavigation ( { options, isPage : this . _page ! . _isPageCall } ) ) ;
67+ return Response . fromNullable ( await this . _channel . waitForNavigation ( { ... options , isPage : this . _page ! . _isPageCall } ) ) ;
6868 }
6969
7070 async waitForLoadState ( state : types . LifecycleEvent = 'load' , options : types . TimeoutOptions = { } ) : Promise < void > {
71- await this . _channel . waitForLoadState ( { state, options, isPage : this . _page ! . _isPageCall } ) ;
71+ await this . _channel . waitForLoadState ( { state, ... options , isPage : this . _page ! . _isPageCall } ) ;
7272 }
7373
7474 async frameElement ( ) : Promise < ElementHandle > {
@@ -94,11 +94,11 @@ export class Frame extends ChannelOwner<FrameChannel, FrameInitializer> {
9494 }
9595
9696 async waitForSelector ( selector : string , options : types . WaitForElementOptions = { } ) : Promise < ElementHandle < Element > | null > {
97- return ElementHandle . fromNullable ( await this . _channel . waitForSelector ( { selector, options, isPage : this . _page ! . _isPageCall } ) ) as ElementHandle < Element > | null ;
97+ return ElementHandle . fromNullable ( await this . _channel . waitForSelector ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ) as ElementHandle < Element > | null ;
9898 }
9999
100100 async dispatchEvent ( selector : string , type : string , eventInit ?: any , options : types . TimeoutOptions = { } ) : Promise < void > {
101- await this . _channel . dispatchEvent ( { selector, type, eventInit : serializeArgument ( eventInit ) , options, isPage : this . _page ! . _isPageCall } ) ;
101+ await this . _channel . dispatchEvent ( { selector, type, eventInit : serializeArgument ( eventInit ) , ... options , isPage : this . _page ! . _isPageCall } ) ;
102102 }
103103
104104 async $eval < R , Arg > ( selector : string , pageFunction : FuncOn < Element , Arg , R > , arg : Arg ) : Promise < R > ;
@@ -125,7 +125,7 @@ export class Frame extends ChannelOwner<FrameChannel, FrameInitializer> {
125125 }
126126
127127 async setContent ( html : string , options : types . NavigateOptions = { } ) : Promise < void > {
128- await this . _channel . setContent ( { html, options, isPage : this . _page ! . _isPageCall } ) ;
128+ await this . _channel . setContent ( { html, ... options , isPage : this . _page ! . _isPageCall } ) ;
129129 }
130130
131131 name ( ) : string {
@@ -149,72 +149,72 @@ export class Frame extends ChannelOwner<FrameChannel, FrameInitializer> {
149149 }
150150
151151 async addScriptTag ( options : { url ?: string , path ?: string , content ?: string , type ?: string } ) : Promise < ElementHandle > {
152- return ElementHandle . from ( await this . _channel . addScriptTag ( { options, isPage : this . _page ! . _isPageCall } ) ) ;
152+ return ElementHandle . from ( await this . _channel . addScriptTag ( { ... options , isPage : this . _page ! . _isPageCall } ) ) ;
153153 }
154154
155155 async addStyleTag ( options : { url ?: string ; path ?: string ; content ?: string ; } ) : Promise < ElementHandle > {
156- return ElementHandle . from ( await this . _channel . addStyleTag ( { options, isPage : this . _page ! . _isPageCall } ) ) ;
156+ return ElementHandle . from ( await this . _channel . addStyleTag ( { ... options , isPage : this . _page ! . _isPageCall } ) ) ;
157157 }
158158
159159 async click ( selector : string , options : types . MouseClickOptions & types . PointerActionWaitOptions & types . NavigatingActionWaitOptions = { } ) {
160- return await this . _channel . click ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
160+ return await this . _channel . click ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
161161 }
162162
163163 async dblclick ( selector : string , options : types . MouseMultiClickOptions & types . PointerActionWaitOptions & types . NavigatingActionWaitOptions = { } ) {
164- return await this . _channel . dblclick ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
164+ return await this . _channel . dblclick ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
165165 }
166166
167167 async fill ( selector : string , value : string , options : types . NavigatingActionWaitOptions = { } ) {
168- return await this . _channel . fill ( { selector, value, options, isPage : this . _page ! . _isPageCall } ) ;
168+ return await this . _channel . fill ( { selector, value, ... options , isPage : this . _page ! . _isPageCall } ) ;
169169 }
170170
171171 async focus ( selector : string , options : types . TimeoutOptions = { } ) {
172- await this . _channel . focus ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
172+ await this . _channel . focus ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
173173 }
174174
175175 async textContent ( selector : string , options : types . TimeoutOptions = { } ) : Promise < null | string > {
176- return await this . _channel . textContent ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
176+ return await this . _channel . textContent ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
177177 }
178178
179179 async innerText ( selector : string , options : types . TimeoutOptions = { } ) : Promise < string > {
180- return await this . _channel . innerText ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
180+ return await this . _channel . innerText ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
181181 }
182182
183183 async innerHTML ( selector : string , options : types . TimeoutOptions = { } ) : Promise < string > {
184- return await this . _channel . innerHTML ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
184+ return await this . _channel . innerHTML ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
185185 }
186186
187187 async getAttribute ( selector : string , name : string , options : types . TimeoutOptions = { } ) : Promise < string | null > {
188- return await this . _channel . getAttribute ( { selector, name, options, isPage : this . _page ! . _isPageCall } ) ;
188+ return await this . _channel . getAttribute ( { selector, name, ... options , isPage : this . _page ! . _isPageCall } ) ;
189189 }
190190
191191 async hover ( selector : string , options : types . PointerActionOptions & types . PointerActionWaitOptions = { } ) {
192- await this . _channel . hover ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
192+ await this . _channel . hover ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
193193 }
194194
195195 async selectOption ( selector : string , values : string | ElementHandle | types . SelectOption | string [ ] | ElementHandle [ ] | types . SelectOption [ ] | null , options : types . NavigatingActionWaitOptions = { } ) : Promise < string [ ] > {
196- return await this . _channel . selectOption ( { selector, values : convertSelectOptionValues ( values ) , options, isPage : this . _page ! . _isPageCall } ) ;
196+ return await this . _channel . selectOption ( { selector, values : convertSelectOptionValues ( values ) , ... options , isPage : this . _page ! . _isPageCall } ) ;
197197 }
198198
199199 async setInputFiles ( selector : string , files : string | types . FilePayload | string [ ] | types . FilePayload [ ] , options : types . NavigatingActionWaitOptions = { } ) : Promise < void > {
200200 const filePayloads = await normalizeFilePayloads ( files ) ;
201- await this . _channel . setInputFiles ( { selector, files : filePayloads . map ( f => ( { name : f . name , mimeType : f . mimeType , buffer : f . buffer . toString ( 'base64' ) } ) ) , options, isPage : this . _page ! . _isPageCall } ) ;
201+ await this . _channel . setInputFiles ( { selector, files : filePayloads . map ( f => ( { name : f . name , mimeType : f . mimeType , buffer : f . buffer . toString ( 'base64' ) } ) ) , ... options , isPage : this . _page ! . _isPageCall } ) ;
202202 }
203203
204204 async type ( selector : string , text : string , options : { delay ?: number } & types . NavigatingActionWaitOptions = { } ) {
205- await this . _channel . type ( { selector, text, options, isPage : this . _page ! . _isPageCall } ) ;
205+ await this . _channel . type ( { selector, text, ... options , isPage : this . _page ! . _isPageCall } ) ;
206206 }
207207
208208 async press ( selector : string , key : string , options : { delay ?: number } & types . NavigatingActionWaitOptions = { } ) {
209- await this . _channel . press ( { selector, key, options, isPage : this . _page ! . _isPageCall } ) ;
209+ await this . _channel . press ( { selector, key, ... options , isPage : this . _page ! . _isPageCall } ) ;
210210 }
211211
212212 async check ( selector : string , options : types . PointerActionWaitOptions & types . NavigatingActionWaitOptions = { } ) {
213- await this . _channel . check ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
213+ await this . _channel . check ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
214214 }
215215
216216 async uncheck ( selector : string , options : types . PointerActionWaitOptions & types . NavigatingActionWaitOptions = { } ) {
217- await this . _channel . uncheck ( { selector, options, isPage : this . _page ! . _isPageCall } ) ;
217+ await this . _channel . uncheck ( { selector, ... options , isPage : this . _page ! . _isPageCall } ) ;
218218 }
219219
220220 async waitForTimeout ( timeout : number ) {
@@ -224,7 +224,7 @@ export class Frame extends ChannelOwner<FrameChannel, FrameInitializer> {
224224 async waitForFunction < R , Arg > ( pageFunction : Func1 < Arg , R > , arg : Arg , options ?: types . WaitForFunctionOptions ) : Promise < SmartHandle < R > > ;
225225 async waitForFunction < R > ( pageFunction : Func1 < void , R > , arg ?: any , options ?: types . WaitForFunctionOptions ) : Promise < SmartHandle < R > > ;
226226 async waitForFunction < R , Arg > ( pageFunction : Func1 < Arg , R > , arg : Arg , options : types . WaitForFunctionOptions = { } ) : Promise < SmartHandle < R > > {
227- return JSHandle . from ( await this . _channel . waitForFunction ( { expression : String ( pageFunction ) , isFunction : typeof pageFunction === 'function' , arg : serializeArgument ( arg ) , options, isPage : this . _page ! . _isPageCall } ) ) as SmartHandle < R > ;
227+ return JSHandle . from ( await this . _channel . waitForFunction ( { expression : String ( pageFunction ) , isFunction : typeof pageFunction === 'function' , arg : serializeArgument ( arg ) , ... options , isPage : this . _page ! . _isPageCall } ) ) as SmartHandle < R > ;
228228 }
229229
230230 async title ( ) : Promise < string > {
0 commit comments