6.0.8 • Published 3 years ago

dotnet-js-interop v6.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm

What is this?

A clone of @microsoft/dotnet-js-interop repacked as UMD library to be used in any environment (browser, node.js, webview, etc). The library is used as a component for interop between .NET and JavaScript and is not a standalone runtime.

In case you're looking for a .NET runtime compiled to a single-file UMD library, check out dotnet-runtime.

Why?

Microsoft is not planning to support any environment, except browser: https://github.com/dotnet/aspnetcore/issues/38208

How to use?

API and behaviour is exactly the same as in the original library: https://docs.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-dotnet-from-javascript

Import depends on the environment:

CommonJS

const DotNet = require("dotnet-js-interop");
// ...
DotNet.invokeMethodAsync("Assembly", "Method", args);

AMD

require(["DotNet"], function (DotNet) {
    DotNet.invokeMethodAsync("Assembly", "Method", args);
});

Script tag

<!DOCTYPE html>
<html>
    ...
    <script src="dotnet-js-interop.js"></script>
    <script>
        DotNet.invokeMethodAsync("Assembly", "Method", args);
    </script>
</html>
6.0.8

3 years ago

6.0.7

3 years ago

6.0.6

3 years ago

6.0.5

3 years ago

6.0.4

3 years ago

6.0.3

3 years ago

6.0.2

3 years ago

6.0.1

3 years ago

6.0.0

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago