WKScriptMessageHandler in swift Today, we'll talk about WKScriptMessageHandler. The way of communicate with javascript. Sometimes we want to get message from javascript. You can catch user event so that handle event properly for example close webView. You can do this by add userContentController to webView. First. Add content controller to webView Second, implement WKScriptMessageHandler Note me..