title: Detect if page is loaded inside WKWebView in JavaScript
body: <p>How can I reliably detect using javascript that a page is loaded inside a WKWebView? I'd like to be able to detect these scenarios:</p>
  
  <ul>
  <li>iOS &amp; WKWebView</li>
  <li>iOS &amp; Safari</li>
  <li>not iOS</li>
  </ul>
  
  <p>There is a similar question about UIWebView <a href="https://stackoverflow.com/questions/4460205/detect-ipad-iphone-webview-via-javascript">here</a>. But it's quite old and I'm not sure if same still applies to WKWebView.</p>