AtomicGameEngine / AtomicExamples

Examples for the Atomic Game Engine
https://www.AtomicGameEngine.com
96 stars 58 forks source link

Webview properties example incorrectly calls setGlobal*Property #69

Open shaddockh opened 8 years ago

shaddockh commented 8 years ago

The setGlobal*Property calls are static methods on the WebView.WebBrowserHost object and are being called on the WebView.browserHost instance. This works fine for JavaScript, but TypeScript complains about it.

// Setup some global JS properties that will be available on every page loaded
// into the WebView
WebView.browserHost.setGlobalBoolProperty("WebViewExample", "boolValue", true);
WebView.browserHost.setGlobalNumberProperty("WebViewExample", "numberValue", 42);
WebView.browserHost.setGlobalStringProperty("WebViewExample", "stringValue", "Hello World!");

Needs to be updated.