title: How to set scale in WKWebview?
body: <p>I´m trying to modify the scale of a page load in a <code>WKWebView</code>. It is working as far as I´m looking in the html. But the actual scale in the WKWebview doesn´t change.</p>
  
  <p>Here´s how I inject the script:</p>
  
  <pre><code>let script =
         "var viewport = document.querySelector(\"meta[name=viewport]\");" +
         "viewport.setAttribute('content', 'width=device-width, initial-scale=0.4, user-scalable=0');" +
  
  let userScript = WKUserScript(source: script,
                                        injectionTime: WKUserScriptInjectionTime.atDocumentEnd,
                                        forMainFrameOnly: true)
  userContentController.addUserScript(userScript)
  </code></pre>
  
  <p>Print the html:</p>
  
  <pre><code>webView.evaluateJavaScript("document.getElementsByTagName('html')[0].innerHTML", completionHandler: { (innerHTML, error) in
              print(innerHTML)
          })
  </code></pre>
  
  <p>HTML result in console:</p>
  
  <pre><code>Optional(&lt;!--&lt;![endif]--&gt;&lt;head&gt;
          &lt;title&gt;Bitcoin (BTC)  $2391.84 (1.85%) | CoinMarketCap&lt;/title&gt;
  
          &lt;meta charset="utf-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=0.4, user-scalable=0"&gt;        
          &lt;meta name="google-site-verification" content="EDc1reqlQ-zAgeRrrgAxRXNK-Zs9JgpE9a0wdaoSO9A"&gt;
          &lt;meta property="og:type" content="website"&gt;
  </code></pre>
  
  <p>I´m asking myself if this is the right approach. I also tried: <code>let script = document.body.style.zoom = '0.8';</code> and <code>let script = document.body.style.webkitTransform = 'scale(0.8)';</code> which is both working in terms of scale, but using this method, the timeperiod slider in <a href="https://coinmarketcap.com/currencies/bitcoin/" rel="nofollow noreferrer">this</a> highchart loses its functionality. Any kind of new ideas would be much appreciated.</p>