How to call this code in C#?
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8
};
Awesomium v1.7.5.0
You can use WebControl.ExecuteJavascript
method to call your JS method from C#.
yourWebControl.ExecuteJavascript("initialize()");
If you need some result returned from javascript, it may be obtained from ExecuteJavascriptWithResult
.
Global javascript objects that will persist between all loaded pages can be created with CreateGlobalJavascriptObject
method.
See documentation describing Awesomium WebControl
methods.