title: How to call C# method in javascript by using GeckoFX as the wrapper of XULRunner
body: <p>I am using <strong>GeckoFX16</strong> and <strong>xulrunner-16.0.2.en-US.win32</strong> in my project.
  The thing is, I want to call a C# method in javascript.</p>
  
  <p>I am curious, is there a way to do this?</p>
  
  <p>Just like below:</p>
  
  <p><code>C#</code> part:</p>
  
  <pre><code>private GeckoWebBrowser weBrowser;
      public browser()
      {
          InitializeComponent();
          Gecko.Xpcom.Initialize("xulrunner");
          weBrowser = new GeckoWebBrowser();
          weBrowser.Parent = this;
          weBrowser.Dock = DockStyle.Fill;
          weBrowser.Navigate("test.html");
      }
  
      public string loadData(){
          //load data from local file.
          return str;
      }
  </code></pre>
  
  <p><code>javascript</code> part:</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
      var data = window.loadData();
      alert(data);
  &lt;/script&gt;
  </code></pre>
  
  <p>I am new in this area, I’ll appreciate if it is possible!</p>