( interactor: Interactor, context: DispatchContext | undefined, edge: ScrollEdge, scope?: string, )
| 830 | } |
| 831 | |
| 832 | async function captureVerifiedScrollEdgeState( |
| 833 | interactor: Interactor, |
| 834 | context: DispatchContext | undefined, |
| 835 | edge: ScrollEdge, |
| 836 | scope?: string, |
| 837 | ): Promise<ScrollEdgeState> { |
| 838 | if (typeof interactor.snapshot !== 'function') { |
| 839 | throw new AppError( |
| 840 | 'UNSUPPORTED_OPERATION', |
| 841 | `scroll ${edge} requires snapshot support to verify hidden content before scrolling`, |
| 842 | ); |
| 843 | } |
| 844 | const snapshot = interactor.snapshot; |
| 845 | return await captureScrollEdgeState({ |
| 846 | edge, |
| 847 | scope, |
| 848 | captureNodes: async (snapshotScope) => |
| 849 | ( |
| 850 | await snapshot({ |
| 851 | appBundleId: context?.appBundleId, |
| 852 | scope: snapshotScope, |
| 853 | }) |
| 854 | ).nodes ?? [], |
| 855 | }); |
| 856 | } |
| 857 | |
| 858 | function parseScrollTarget(input: string): { |
| 859 | direction: ReturnType<typeof parseScrollDirection>; |
no test coverage detected