SAPWKUIDelegate
public protocol SAPWKUIDelegate : AnyObject
This protocol extends the WKUIDelegate
with SAP specific functionality.
-
webView(_:createWebViewWith:for:windowFeatures:)
Default implementationCreates 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?
-
webView(_:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)
Default implementationThis 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)
-
webView(_:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)
Default implementationThis 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)
-
webView(_:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)
Default implementationThis 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)