awesomium

calling Javascript from c# using awesomium

泪湿孤枕 提交于 2019-11-30 08:56:57
I'm trying awesomium for create a basic app, I'm testing the js <----> c# communication but this doesn't seem work well...I create a local html and open it..so far so good..but when I try call js nothing happen, no error, no bug, nothing, simply this doesn't call js.. my basic js code is: var base = { newItem : function(item){ $("#botones").append('<div class="botonMenu">' + item + '</div>'); }, other : function(){ alert("hi!!"); } } if I test this inside firebug obviously I can call my functions well and the items are created or the alert box... now..my c# code is this //I've wrote this code

calling Javascript from c# using awesomium

无人久伴 提交于 2019-11-29 12:55:23
问题 I'm trying awesomium for create a basic app, I'm testing the js <----> c# communication but this doesn't seem work well...I create a local html and open it..so far so good..but when I try call js nothing happen, no error, no bug, nothing, simply this doesn't call js.. my basic js code is: var base = { newItem : function(item){ $("#botones").append('<div class="botonMenu">' + item + '</div>'); }, other : function(){ alert("hi!!"); } } if I test this inside firebug obviously I can call my

Can I use Awesomeium within a web application?

一个人想着一个人 提交于 2019-11-29 11:47:10
I'm trying to render a html code to export it to an image and then use that image to put it in a pdf document. I'm doing all in an asp.net/C# web application. The problem I'm having is that when I do that more than one time it give me this error: You are attempting to re-initialize the WebCore. The WebCore must only be initialized once per process and must be shut down only when the process exits. This is my code: WebCore.Initialize(new WebConfig(), false); using (WebView webView = WebCore.CreateWebView((pdfWidth - 80).ToString().ToInt() + 20, (pdfHeight / 2).ToString().ToInt() + 20)) {

Can I use Awesomeium within a web application?

大憨熊 提交于 2019-11-28 05:06:47
问题 I'm trying to render a html code to export it to an image and then use that image to put it in a pdf document. I'm doing all in an asp.net/C# web application. The problem I'm having is that when I do that more than one time it give me this error: You are attempting to re-initialize the WebCore. The WebCore must only be initialized once per process and must be shut down only when the process exits. This is my code: WebCore.Initialize(new WebConfig(), false); using (WebView webView = WebCore

Can I call application methods from JavaScript in Awesomium?

邮差的信 提交于 2019-11-28 04:11:51
I've scoured the internet looking for an answer, but I must be asking the wrong question. I have a C# winforms app with an Awesomium web control. Am I able to call methods defined in the app from javascript in the page that loads? If so, how? (sample js code would be greatly appreciated). Thanks! The approach depends on which version of Awesomium you're using. There's been a bit of a change of how this is done in the upcoming version 1.7 (currently at 1.7 RC3) and how it was done before. Note that there's one improvement in 1.7, in that .NET methods can now return values when JS calls a method