IWebViewJavascriptRequest EventAwesomium.NET 1.7.6Awesomium.NET
Occurs when a JavaScript client sends a management request through OSMJIF (such as minimize(Multiple), maximize(Multiple) etc.).

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version: 1.7.6.0
Syntax

event JavascriptRequestEventHandler JavascriptRequest

Value

Type: Awesomium.CoreJavascriptRequestEventHandler
Remarks

The request sent is identified by Request.

A request token can be passed by JavaScript clients to the native application and it's received through RequestToken

This can represent any primitive JavaScript value other than Object. Management requests (such as minimize(Multiple)) are sent synchronously so that the native application can provide a response and therefore JavaScript objects (including JavaScript functions) cannot be passed to these requests. Any objects passed by a JavaScript client through any of these methods, will be replaced by Undefined.

Note that any string literal or other primitive values passed to the native application, are passed through IPC messages. Though wrapped to a native JSValue proxy, such data can be intercepted and therefore applications and native clients should optionally utilize an encryption they can both understand, to increase security.

Note Note
Applications handling JavascriptRequest, must explicitly set Handled to true to let JavaScript clients know that the request has been accepted and processed.

Unless the request originates from a page that has been created by the application (such as pages provided though a DataSource), applications should be careful when handling management requests. For example, a exit(Multiple) command asks from the native application to exit immediately. The RequestToken is provided so that native applications can validate such requests.

See Also

Reference