Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xilium CefGlue Async Javascript to native C# with parameters and return values?

I have been experimenting with CEFGlue in C# recently particularly from the JS>Native integration.

I have tried 3 approaches but none seems to be appropriate.

  1. Through XHR and Custom SchemeHandler - generally great but seems to blocks both the renderer and browser for long running tasks.
  2. Through V8 callbacks - awesome but blocks the renderer for long running tasks
  3. Through cefQuery aka Asynchronous Bindings - does not block the renderer or browser but does not seem to have support for passing any parameters.

I have a trivial requirement it seems.

  1. Asynchronous execution i.e. neither browser nor renderer are to block on long running tasks.
  2. I need to pass parameters and process return values in Javascript.

Is there a feature of CEFGlue that I can experiment with that will allow me to accomplish this task?

Thanks.

like image 785
Moonwalker Avatar asked Mar 11 '26 10:03

Moonwalker


1 Answers

I have posted an answer to my own question on Google CEF group. The solution works quite well.

CEF Google Group

like image 96
Moonwalker Avatar answered Mar 13 '26 00:03

Moonwalker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!