Skip to content

Commit 07a7b5c

Browse files
committed
feat(core): support cancelling channel calls via AbortSignal
Threads an AbortSignal through the client as a required second argument on channel methods (mirroring progress on the dispatcher side), so server-side calls can be cancelled.
1 parent 3d38b1d commit 07a7b5c

49 files changed

Lines changed: 3478 additions & 734 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/src/api/class-elementhandle.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ When all steps combined have not finished during the specified [`option: timeout
188188
### option: ElementHandle.check.timeout = %%-input-timeout-js-%%
189189
* since: v1.8
190190

191+
### option: ElementHandle.check.signal = %%-input-signal-%%
192+
191193
### option: ElementHandle.check.trial = %%-input-trial-%%
192194
* since: v1.11
193195

@@ -233,6 +235,8 @@ When all steps combined have not finished during the specified [`option: timeout
233235
### option: ElementHandle.click.timeout = %%-input-timeout-js-%%
234236
* since: v1.8
235237

238+
### option: ElementHandle.click.signal = %%-input-signal-%%
239+
236240
### option: ElementHandle.click.trial = %%-input-trial-%%
237241
* since: v1.11
238242

@@ -289,6 +293,8 @@ When all steps combined have not finished during the specified [`option: timeout
289293
### option: ElementHandle.dblclick.timeout = %%-input-timeout-js-%%
290294
* since: v1.8
291295

296+
### option: ElementHandle.dblclick.signal = %%-input-signal-%%
297+
292298
### option: ElementHandle.dblclick.trial = %%-input-trial-%%
293299
* since: v1.11
294300

@@ -551,6 +557,8 @@ Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
551557
### option: ElementHandle.fill.timeout = %%-input-timeout-js-%%
552558
* since: v1.8
553559

560+
### option: ElementHandle.fill.signal = %%-input-signal-%%
561+
554562
## async method: ElementHandle.focus
555563
* since: v1.8
556564
* discouraged: Use locator-based [`method: Locator.focus`] instead. Read more about [locators](../locators.md).
@@ -599,6 +607,8 @@ When all steps combined have not finished during the specified [`option: timeout
599607
### option: ElementHandle.hover.timeout = %%-input-timeout-js-%%
600608
* since: v1.8
601609

610+
### option: ElementHandle.hover.signal = %%-input-signal-%%
611+
602612
### option: ElementHandle.hover.trial = %%-input-trial-%%
603613
* since: v1.11
604614

@@ -727,6 +737,8 @@ Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
727737
### option: ElementHandle.press.timeout = %%-input-timeout-js-%%
728738
* since: v1.8
729739

740+
### option: ElementHandle.press.signal = %%-input-signal-%%
741+
730742
## async method: ElementHandle.querySelector
731743
* since: v1.9
732744
* discouraged: Use locator-based [`method: Page.locator`] instead. Read more about [locators](../locators.md).
@@ -776,6 +788,8 @@ Returns the buffer with the captured screenshot.
776788
### option: ElementHandle.screenshot.timeout = %%-input-timeout-js-%%
777789
* since: v1.8
778790

791+
### option: ElementHandle.screenshot.signal = %%-input-signal-%%
792+
779793
### option: ElementHandle.screenshot.maskColor = %%-screenshot-option-mask-color-%%
780794
* since: v1.34
781795

@@ -801,6 +815,8 @@ See [scrolling](../input.md#scrolling) for alternative ways to scroll.
801815
### option: ElementHandle.scrollIntoViewIfNeeded.timeout = %%-input-timeout-js-%%
802816
* since: v1.8
803817

818+
### option: ElementHandle.scrollIntoViewIfNeeded.signal = %%-input-signal-%%
819+
804820
## async method: ElementHandle.selectOption
805821
* since: v1.8
806822
* discouraged: Use locator-based [`method: Locator.selectOption`] instead. Read more about [locators](../locators.md).
@@ -883,6 +899,8 @@ await handle.SelectOptionAsync(new[] {
883899
### option: ElementHandle.selectOption.timeout = %%-input-timeout-js-%%
884900
* since: v1.8
885901

902+
### option: ElementHandle.selectOption.signal = %%-input-signal-%%
903+
886904
### param: ElementHandle.selectOption.element = %%-python-select-options-element-%%
887905
* since: v1.8
888906

@@ -913,6 +931,8 @@ If the element is inside the `<label>` element that has an associated [control](
913931
### option: ElementHandle.selectText.timeout = %%-input-timeout-js-%%
914932
* since: v1.8
915933

934+
### option: ElementHandle.selectText.signal = %%-input-signal-%%
935+
916936
## async method: ElementHandle.setChecked
917937
* discouraged: Use locator-based [`method: Locator.setChecked`] instead. Read more about [locators](../locators.md).
918938
* since: v1.15
@@ -947,6 +967,8 @@ When all steps combined have not finished during the specified [`option: timeout
947967
### option: ElementHandle.setChecked.timeout = %%-input-timeout-js-%%
948968
* since: v1.15
949969

970+
### option: ElementHandle.setChecked.signal = %%-input-signal-%%
971+
950972
### option: ElementHandle.setChecked.trial = %%-input-trial-%%
951973
* since: v1.15
952974

@@ -973,6 +995,8 @@ This method expects [ElementHandle] to point to an
973995
### option: ElementHandle.setInputFiles.timeout = %%-input-timeout-js-%%
974996
* since: v1.8
975997

998+
### option: ElementHandle.setInputFiles.signal = %%-input-signal-%%
999+
9761000
## async method: ElementHandle.tap
9771001
* since: v1.8
9781002
* discouraged: Use locator-based [`method: Locator.tap`] instead. Read more about [locators](../locators.md).
@@ -1009,6 +1033,8 @@ When all steps combined have not finished during the specified [`option: timeout
10091033
### option: ElementHandle.tap.timeout = %%-input-timeout-js-%%
10101034
* since: v1.8
10111035

1036+
### option: ElementHandle.tap.signal = %%-input-signal-%%
1037+
10121038
### option: ElementHandle.tap.trial = %%-input-trial-%%
10131039
* since: v1.11
10141040

@@ -1050,6 +1076,8 @@ Time to wait between key presses in milliseconds. Defaults to 0.
10501076
### option: ElementHandle.type.timeout = %%-input-timeout-js-%%
10511077
* since: v1.8
10521078

1079+
### option: ElementHandle.type.signal = %%-input-signal-%%
1080+
10531081
## async method: ElementHandle.uncheck
10541082
* since: v1.8
10551083
* discouraged: Use locator-based [`method: Locator.uncheck`] instead. Read more about [locators](../locators.md).
@@ -1082,6 +1110,8 @@ When all steps combined have not finished during the specified [`option: timeout
10821110
### option: ElementHandle.uncheck.timeout = %%-input-timeout-js-%%
10831111
* since: v1.8
10841112

1113+
### option: ElementHandle.uncheck.signal = %%-input-signal-%%
1114+
10851115
### option: ElementHandle.uncheck.trial = %%-input-trial-%%
10861116
* since: v1.11
10871117

@@ -1115,6 +1145,8 @@ A state to wait for, see below for more details.
11151145
### option: ElementHandle.waitForElementState.timeout = %%-input-timeout-js-%%
11161146
* since: v1.8
11171147

1148+
### option: ElementHandle.waitForElementState.signal = %%-input-signal-%%
1149+
11181150
## async method: ElementHandle.waitForSelector
11191151
* since: v1.8
11201152
* discouraged: Use web assertions that assert visibility or a locator-based [`method: Locator.waitFor`] instead.
@@ -1182,5 +1214,7 @@ This method does not work across navigations, use [`method: Page.waitForSelector
11821214
### option: ElementHandle.waitForSelector.timeout = %%-input-timeout-js-%%
11831215
* since: v1.8
11841216

1217+
### option: ElementHandle.waitForSelector.signal = %%-input-signal-%%
1218+
11851219
### option: ElementHandle.waitForSelector.strict = %%-input-strict-%%
11861220
* since: v1.15

docs/src/api/class-filechooser.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,5 @@ they are resolved relative to the current working directory. For empty array, cl
7373

7474
### option: FileChooser.setFiles.timeout = %%-input-timeout-js-%%
7575
* since: v1.8
76+
77+
### option: FileChooser.setFiles.signal = %%-input-signal-%%

0 commit comments

Comments
 (0)