     }
 }
 
+// MARK: WKUIDelegate
+
 extension VerificationFlowWebView: WKUIDelegate {
     func webViewDidClose(_ webView: WKWebView) {
         // `window.close` is called in JS

        }
    }

    // MARK: Delegates

    weak var delegate: VerificationFlowWebViewDelegate?

        return nil
    }
}

// MARK: - WKScriptMessageHandler

extension VerificationFlowWebView: WKScriptMessageHandler {
    func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
        guard let messageHandler = ScriptMessageHandler(rawValue: message.name) else { return }

        switch messageHandler {
        case .closeWindow:
            delegate?.verificationFlowWebViewDidClose(self)
        }
    }
}
