decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { let request = navigationAction.request guard let requestUrl = request.url, navigationAction.navigationType == .linkActivated else { return decisionHandler(.allow) } switch (requestUrl.scheme, requestUrl.host) { case ("local", "subscribe"): self.viewModel.subscribeButtonDidTap.onNext(()) return decisionHandler(.cancel) <略> default: return decisionHandler(.allow) } } }