Get started with Bridge.NET CDN
Apache-2.0 licensed
Bridge.NET is a Microsoft project that enables .NET developers to call JS and vice versa in the same process.
Tags:- Bridge.NET
- JavaScript
- Compiler
Stable version
Copied!
How to start using Bridge.NET CDN
using System;
using System.Runtime.InteropServices.JS;
namespace BridgeNetExample
{
class Program
{
static void Main(string[] args)
{
// Initialize Bridge.NET
JSContext.Attach(new JSContext());
JSRuntime.GlobalObject = JSContext.Current.GlobalObject;
// Load the Bridge.NET library from the CDN
JSRuntime.InvokeVoid("eval", new JsString("(function() { window.Bridge = Bridge || {}; Bridge.loadScript = function(url, callback) { var s = document.createElement('script'); s.src = url; s.onload = callback; document.head.appendChild(s); }; })();"));
Bridge.loadScript("https://cdn.cdnhub.io/Bridge.NET/17.10.1/bridge.min.js", () =>
{
// Call a JavaScript function from Bridge.NET
Bridge.callAll("alert", "Hello from Bridge.NET!");
});
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
1.10.0
1.11.0
1.12.0
1.13.0
1.14.0
1.5.0
1.6.0
1.7.0
1.8.0
1.9.0
15.0.0
15.1.0
15.2.0
15.3.0
15.4.0
15.5.0
15.6.0
15.7.0
16.0.0
16.0.0-beta
16.0.0-beta2
16.0.0-beta3
16.0.0-beta4
16.0.0-beta5
16.0.1
16.1.0
16.2.0
16.3.0
16.3.2
16.4.0
16.4.1
16.5.0
16.6.0
16.6.1
16.7.0
16.7.1
16.8.0
16.8.1
16.8.2
16.8.3
17.0.0
17.0.0-beta
17.1.0
17.1.1
17.10.0
*** 17.10.1
17.2.0
17.3.0
17.4.0
17.5.0
17.6.0
17.7.0
17.8.0
17.9.0