Call swift function with javascript using UIWebview
<p>I apologize if this has been asked but I was unable to find any answer or solution. I am looking to call a JavaScript function from a "UIWebView" and listen for it in swift. Any example I have found uses "WKWebView". There has to be an easy way to listen to a JavaScript function like the below: </p>

<pre><code>// HTML / JS
&lt;div id ="myDiv" onclick="listenInSwift()"&gt;myItem&lt;/div&gt;
</code></pre>

<p>Is this possible with a UIWebView? Thanks all!</p>