src/vs/platform/webview/electron-main/webviewMainService.ts/WebviewMainService/findInFrame
class WebviewMainService:	public async findInFrame(windowId: WebviewWindowId, frameName: string, text: string, options: { findNext?: boolean, forward?: boolean }): Promise<void> {
		const initialFrame = this.getFrameByName(windowId, frameName);

		type WebFrameMainWithFindSupport = typeof WebFrameMain & {
			findInFrame?(text: string, findOptions: FindInFrameOptions): void;
		};
		const frame = initialFrame as unknown as WebFrameMainWithFindSupport;
		if (typeof frame.findInFrame === 'function') {
			frame.findInFrame(text, {
				findNext: options.findNext,
				forward: options.forward,
			});
			const foundInFrameHandler = (_: unknown, result: FoundInFrameResult) => {
				if (result.finalUpdate) {
					this._onFoundInFrame.fire(result);
					initialFrame.removeListener('found-in-frame', foundInFrameHandler);
				}
			};
			initialFrame.on('found-in-frame', foundInFrameHandler);
		}
	}