mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
7b55c9e3ee
- modified CEF to provide callback after JavaScript completion - removes need for JsResultHandler - patch for CEF issue 151 in patches folder - v8 to/from CEF methods moved to Utils.h
25 lines
449 B
C++
25 lines
449 B
C++
#include "stdafx.h"
|
|
#include "JsTask.h"
|
|
#include "Utils.h"
|
|
|
|
namespace CefSharp
|
|
{
|
|
void JsTask::HandleSuccess(CefRefPtr<CefV8Value> result)
|
|
{
|
|
Object^ obj = convertFromCef(result);
|
|
if(obj != nullptr)
|
|
{
|
|
_browser->SetJsResult(obj->ToString());
|
|
}
|
|
else
|
|
{
|
|
_browser->SetJsResult("");
|
|
}
|
|
}
|
|
|
|
void JsTask::HandleError()
|
|
{
|
|
_browser->SetJsError();
|
|
}
|
|
|
|
} |