title: Setting innerHTML in a webview replaces the entire document instead of just the element
body: <p>Note: This is scaloid, so the syntax is a bit different from Java, but all the classes are the usual Android classes from Java.</p>
  
  <p>I'm initializing a webview using:</p>
  
  <pre><code>webView.settings.setJavaScriptEnabled(true)
  webView.setWebChromeClient(new WebChromeClient)
  </code></pre>
  
  <p>and then I call</p>
  
  <pre><code>val jsUrl = "javascript:document.getElementById('" + getTagId(word) + "').innerHTML = '" + guess + "'"
  webView.loadUrl(jsUrl)
  </code></pre>
  
  <p>where <code>getTagId(word)</code> is an existing ID (I've debugged this) and <code>guess</code> is a short string like <code>"abc"</code>.</p>
  
  <p>It works perfectly in my desktop browser, but in the webview it replaces the entire document instead of just replacing the element.</p>
  
  <p>I've tried to debug and make sure that the element is actually found by replacing the call with</p>
  
  <pre><code>"javascript:alert(document.getElementById('" + getTagId(word) + "').innerHTML)"
  </code></pre>
  
  <p>and it shows an alert with the right content! Only the replacement goes wrong.</p>
  
  <p>This bug is driving me crazy :-( What am I missing?</p>
  
  <p>P.S. I'm working on this open-source project: <a href="https://github.com/ilyakogan/gluckentext" rel="nofollow">https://github.com/ilyakogan/gluckentext</a></p>