Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
440 stars 49 forks source link

calling external functions #58

Closed deandob closed 5 years ago

deandob commented 6 years ago

Hi,

Is there a way to call external (C#) functions from JS code? I see promises aren't supported for async return, but even a simple callback mechanism that calls a different JS function would suffice once the c# function completes.

ALso I assume there is no way to use modules in JS?

Thanks for the help.

Taritsyn commented 6 years ago

Hello, Dean!

Is there a way to call external (C#) functions from JS code? I see promises aren't supported for async return, but even a simple callback mechanism that calls a different JS function would suffice once the c# function completes.

See a examples of using the EmbedHostObject method in unit tests.

ALso I assume there is no way to use modules in JS?

Modules are not supported.