title: Unable to use Console.Log() within a WebBrowser Control
body: <p>So I'm writing a Javascript coding UI using C# Windows Forms. This is my code for when the "Run" button is pressed, in case it helps:</p>
  
  <pre class="lang-cs prettyprint-override"><code>//If the button in the upper-right corner is clicked
      private void run_Click(object sender, EventArgs e)
      {
          //If the program isn't running
          if (!running)
          {
              //Show the web browser
              webBrowser1.Visible = true;
              richTextBox1.Visible = false;
              //Set the label to Running
              status.Text = "Running";
              //Set the html text to this below
              webBrowser1.DocumentText = "&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;body&gt;&lt;script&gt;\n" + richTextBox1.Text + "\n&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;";
              //Set the "run" button to "stop"
              run.Text = "Stop";
              //Set the status to running
              running = true;
          }
          //otherwise
          else
          {
              //Show the text box
              webBrowser1.Visible = false;
              richTextBox1.Visible = true;
              //Set the label to Ready
              status.Text = "Ready";
              //Go to nothingness
              webBrowser1.Navigate("about:blank");
              //Set the "stop" button to "run"
              run.Text = "Run";
              //Set the status to not running
              running = false;
          }
      }
  </code></pre>
  
  <p>I run the program, and for the most part, everything works fine. However, when I try to use the console.log() command, the following error appears:</p>
  
  <pre><code>'console' is undefined
  </code></pre>
  
  <p>I also try Console.Log (I actually don't know Javascript; just trying my best) but that returns the same error, that 'Console' is undefined.</p>
  
  <p>Also, once I get console.log working, how do I open the console on the WebBrowser control? I've tried searching the internet, but nothing has come up on either of these questions.</p>