title: WebView InvokeScript HRESULT 0x80020101
body: <p>I'm trying to invoke a function in a WebView. Some target functions I need to call are these:</p>
  
  <pre><code>play: function()
  {
      if (this.value &lt; this.p.max)
      {
          this.inc();
          this.timer = new it_timer({ object: this, method: "play", timeout: 200 });
      }
      else
          this.stop();
  },
  stop: function()
  {
      if (this.timer)
          this.timer.stop();
      this.playing = false;
      this.playbutton.style.backgroundPosition = "0 0";
  }
  </code></pre>
  
  <p>I started by calling</p>
  
  <pre><code>webView.InvokeScript("play", new string[0]);
  </code></pre>
  
  <p>but that didn't work, HRESULT: 0x80020101. I found this <a href="http://support.microsoft.com/kb/247784" rel="noreferrer">http://support.microsoft.com/kb/247784</a> on the topic, but it didn't help me at all.</p>
  
  <p>I then tried to do what I found as an example on multiple sites:</p>
  
  <pre><code>webView.InvokeScript("eval", new string[] { "document.documentElement.outerHTML;");
  </code></pre>
  
  <p>and </p>
  
  <pre><code>webView.InvokeScript("alert", new string[] {"message"});
  </code></pre>
  
  <p>but both of those didn't work, giving the same HRESULT code. The WebView renders normally and javascript works fine on the page.</p>
  
  <p>I'd appreciate any help in identifying the problem / finding a solution.</p>
  
  <p>EDIT: It seems "alert" and all methods which are declared in classes don't work. There seems to have been an InvokeMethod(..) in earlier .NET Versions, are there any alternatives for WinRT?</p>