title: AutoBinding CefSharp.BindObjectAsync in IRenderProcessMessageHandler:OnContextCreated
body: <p>using CEFSharp i try to autoinject a bound Object in the <code>IRenderProcessMessageHandler:OnContextCreated</code> Method but i guess there is a <code>await</code> missing:</p>
  <pre><code>_chromeProxy = new ChromeProxy();
  chromiumWebBrowser1.RenderProcessMessageHandler = new RenderProcessMessageHandler();
  chromiumWebBrowser1.JavascriptObjectRepository.ObjectBoundInJavascript += (mysender, mye) =&gt;
      {
         var name = mye.ObjectName;
         Console.WriteLine($&quot;Object {mye.ObjectName} was bound successfully.&quot;); //Gets triggered
      };
  chromiumWebBrowser1.JavascriptObjectRepository.Register(&quot;App&quot;, new ChromeProxy(),  true);
  </code></pre>
  <p>and the <code>OnContextCreated</code> Method:</p>
  <pre><code>public void OnContextCreated(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame)
          {
              // Does bind but too late ( no await )
              const string script = &quot;CefSharp.BindObjectAsync('App');&quot;;
              frame.ExecuteJavaScriptAsync(script); 
  
              // ERR: Uncaught SyntaxError: await is only valid in async function
              // const string script = &quot;await CefSharp.BindObjectAsync('App');&quot;;
              // frame.ExecuteJavaScriptAsync(script);          
          }
  </code></pre>
  <p>Is it possible to register the bound Object with this approach and if, how could i await the result of the binding before Javascript on the page gets executed?</p>