Skip to content

Javascript

Riekelt Brands edited this page Apr 1, 2021 · 9 revisions

Evaluating Javascript

You can evaluate Javascript both with and without callback.

To evaluate without a callback simply call CefInstance.Eval(string javascript) Example

CefInstance.Eval("window.location.href = 'https://www.google.com/';");

To evaluate with a callback, you can call CefInstance.EvalCallback(string javascript, Action<string> callback) Example

CefIntance.Eval("window.location.href = 'https://www.google.com/';", (string result) => {
    Debug.Log(result); // https://www.google.com
});

Invoking static classes from Javascript

Work in progress

Clone this wiki locally