daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jun 22nd, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class CefSharpCommonObject
  2.   {
  3.     public dynamic Start()
  4.     {
  5.       var response = dummyProc.Start();
  6.  
  7.       return new
  8.       {
  9.         response.IsSuccess
  10.       };
  11.     }
  12.  
  13.     public dynamic Stop()
  14.     {
  15.       var response = dummyProc.Stop();
  16.  
  17.       return new
  18.       {
  19.         response.IsSuccess
  20.       };
  21.     }
  22.   }
  23.    
  24. cefBrowser.JavascriptObjectRepository.Register("jsCommunicator", new CefSharpCommonObject(), true);
  25.    
  26. <script type="text/javascript">
  27.     (async () => {
  28.       await CefSharp.BindObjectAsync("jsCommunicator", "jsTest");
  29.  
  30.       jsCommunicator.start().then(() => {
  31.       }, () => {
  32.       });
  33.  
  34.       setTimeout(jsCommunicator.stop, 5000);
  35.     })();
  36.   </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top