SAPWKUIDelegate

public protocol SAPWKUIDelegate : AnyObject

This protocol extends the WKUIDelegate with SAP specific functionality.

  • Creates a new web view, The web view returned must be created with the specified configuration. WebKit loads the request in the returned web view.

    Default Implementation

    Creates a new web view, The web view returned must be created with the specified configuration. WebKit loads the request in the returned web view.

    Declaration

    Swift

    func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView?
  • This delegate is invoked when there is javascript alert in the webview. An alert should be created with the given message.

    Default Implementation

    Declaration

    Swift

    func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void)
  • This delegate is invoked if there is javascript confirm panel in the webview. Creates a confirm panel with the given message.

    Default Implementation

    Declaration

    Swift

    func webView(_ webView: WKWebView, runJavaScriptConfirmPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping (Bool) -> Void)
  • This delegate is invoked if there is a javascript process for text input panel in the webview. Creates a text input panel with the given prompt message.

    Default Implementation

    Declaration

    Swift

    func webView(_ webView: WKWebView, runJavaScriptTextInputPanelWithPrompt prompt: String, defaultText: String?, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping (String?) -> Void)