Guest User

Untitled

a guest
Jun 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  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>
Add Comment
Please, Sign In to add comment