Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CefSharpCommonObject
- {
- public dynamic Start()
- {
- var response = dummyProc.Start();
- return new
- {
- response.IsSuccess
- };
- }
- public dynamic Stop()
- {
- var response = dummyProc.Stop();
- return new
- {
- response.IsSuccess
- };
- }
- }
- cefBrowser.JavascriptObjectRepository.Register("jsCommunicator", new CefSharpCommonObject(), true);
- <script type="text/javascript">
- (async () => {
- await CefSharp.BindObjectAsync("jsCommunicator", "jsTest");
- jsCommunicator.start().then(() => {
- }, () => {
- });
- setTimeout(jsCommunicator.stop, 5000);
- })();
- </script>
Add Comment
Please, Sign In to add comment