SEBWIN-510: Made initialization of SEB JavaScript API asynchronous in order to fix issue on slow / virtualized machines.
This commit is contained in:
parent
58ec2dde35
commit
d82d62f35f
1 changed files with 8 additions and 4 deletions
|
@ -7,6 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using CefSharp;
|
using CefSharp;
|
||||||
using SafeExamBrowser.Browser.Content;
|
using SafeExamBrowser.Browser.Content;
|
||||||
using SafeExamBrowser.Browser.Wrapper;
|
using SafeExamBrowser.Browser.Wrapper;
|
||||||
|
@ -143,11 +144,14 @@ namespace SafeExamBrowser.Browser
|
||||||
|
|
||||||
private void Control_FrameLoadStart(object sender, FrameLoadStartEventArgs e)
|
private void Control_FrameLoadStart(object sender, FrameLoadStartEventArgs e)
|
||||||
{
|
{
|
||||||
var browserExamKey = generator.CalculateBrowserExamKeyHash(e.Url);
|
Task.Run(() =>
|
||||||
var configurationKey = generator.CalculateConfigurationKeyHash(e.Url);
|
{
|
||||||
var api = contentLoader.LoadApi(browserExamKey, configurationKey, appConfig.ProgramBuildVersion);
|
var browserExamKey = generator.CalculateBrowserExamKeyHash(e.Url);
|
||||||
|
var configurationKey = generator.CalculateConfigurationKeyHash(e.Url);
|
||||||
|
var api = contentLoader.LoadApi(browserExamKey, configurationKey, appConfig.ProgramBuildVersion);
|
||||||
|
|
||||||
e.Frame.ExecuteJavaScriptAsync(api);
|
e.Frame.ExecuteJavaScriptAsync(api);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Control_IsBrowserInitializedChanged(object sender, EventArgs e)
|
private void Control_IsBrowserInitializedChanged(object sender, EventArgs e)
|
||||||
|
|
Loading…
Add table
Reference in a new issue