Skip to content

Commit

Permalink
Added browser demo for Jint.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilev committed Oct 22, 2024
0 parents commit 246090b
Show file tree
Hide file tree
Showing 94 changed files with 123 additions and 0 deletions.
Binary file added Jint/_framework/Acornima.wasm
Binary file not shown.
Binary file added Jint/_framework/Acornima.wasm.br
Binary file not shown.
Binary file added Jint/_framework/Acornima.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/Jint.wasm
Binary file not shown.
Binary file added Jint/_framework/Jint.wasm.br
Binary file not shown.
Binary file added Jint/_framework/Jint.wasm.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Jint/_framework/System.Collections.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Collections.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Collections.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Console.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Console.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Console.wasm.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Jint/_framework/System.Linq.Expressions.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Linq.Expressions.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Linq.Expressions.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Linq.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Linq.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Linq.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Memory.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Memory.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Memory.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Net.Http.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Net.Http.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Net.Http.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Net.Primitives.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Net.Primitives.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Net.Primitives.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.ObjectModel.wasm
Binary file not shown.
Binary file added Jint/_framework/System.ObjectModel.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.ObjectModel.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Private.CoreLib.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Private.CoreLib.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Private.CoreLib.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Private.Uri.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Private.Uri.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Private.Uri.wasm.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Jint/_framework/System.Runtime.Numerics.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Runtime.Numerics.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Runtime.Numerics.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Runtime.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Runtime.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Runtime.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Text.Encodings.Web.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Text.Encodings.Web.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Text.Encodings.Web.wasm.gz
Binary file not shown.
Binary file added Jint/_framework/System.Text.Json.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Text.Json.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Text.Json.wasm.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Jint/_framework/System.Threading.wasm
Binary file not shown.
Binary file added Jint/_framework/System.Threading.wasm.br
Binary file not shown.
Binary file added Jint/_framework/System.Threading.wasm.gz
Binary file not shown.
48 changes: 48 additions & 0 deletions Jint/_framework/blazor.boot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"mainAssemblyName": "browser",
"resources": {
"hash": "sha256-XWvS7XlE3KPbQTx8+QiqFgNj20NFrSLTS8zF/XxIdDc=",
"jsModuleNative": {
"dotnet.native.8.0.10.nt3v235mvd.js": "sha256-/UERTTPsmGnLQHuAuCYJDJKEF4TUg7/WqucVugViiVU="
},
"jsModuleRuntime": {
"dotnet.runtime.8.0.10.1v4nyb1010.js": "sha256-FjrgL9dY6dc2yUoXDWowSfachSgM8O29qUMWDQOJKRI="
},
"wasmNative": {
"dotnet.native.wasm": "sha256-w+iJfnEUB/B3P/fYvtoznO+aiVk9lk7+k82I5oVh3Ks="
},
"icu": {
"icudt_CJK.dat": "sha256-SZLtQnRc0JkwqHab0VUVP7T3uBPSeYzxzDnpxPpUnHk=",
"icudt_EFIGS.dat": "sha256-8fItetYY8kQ0ww6oxwTLiT3oXlBwHKumbeP2pRF4yTc=",
"icudt_no_CJK.dat": "sha256-L7sV7NEYP37/Qr2FPCePo5cJqRgTXRwGHuwF5Q+0Nfs="
},
"assembly": {
"Acornima.wasm": "sha256-wNKi1IrqTjE2QjQyFyA+SqGoqGUnGIkLBaLcU3kIG/U=",
"browser.wasm": "sha256-cI7yeJB+aRUZQiKnJyqw/lo6sJ9iYAnUtOPmCrSBIvY=",
"Jint.wasm": "sha256-ulvvU/K+ywQThFimNs69p92eDNQ5r96LP7AWVtOc7ow=",
"System.Collections.Concurrent.wasm": "sha256-sPJCA6QFCLEJzYuh2/wtuiKGPXrhqj13rx7rDSRb3kU=",
"System.Collections.wasm": "sha256-ggVSAcAO8Nvzn1elUaC9glvRzQDvnkCJOLZ57OVWSNA=",
"System.Console.wasm": "sha256-uGE7r/t9ZMGR5vRrLYFEiSgEPPoTguaOVry7HwCw4Hw=",
"System.Diagnostics.DiagnosticSource.wasm": "sha256-NtcOYWsn4RExmoupaGwhBz8XESBEL+l4sz4zDbrQ56g=",
"System.Linq.Expressions.wasm": "sha256-s7NiZ2WMfWh0n4hh96wnZNClSKpsKoV+BQ7J3+bVz94=",
"System.Linq.wasm": "sha256-8g94vzyyFG6NbFITIMtEdIqgBK8vWpfRsvxxwQ1Vm0g=",
"System.Memory.wasm": "sha256-GmDczFjCDJNM0dkzpqfNkka+/Opt9OQ4zRMHnN9UIHs=",
"System.Net.Http.wasm": "sha256-AceO9n2mtkieRzoO/smW+/1AnSU2FDT7Db1dq65SOmI=",
"System.Net.Primitives.wasm": "sha256-6drddFRuqk4iC658pgQT83Kw62TGXYLyaQUOQwdN4JQ=",
"System.ObjectModel.wasm": "sha256-fKMRqWnLcSFe1hvQNqpL8WkHSEMakAI7JVVXF7hUE4Y=",
"System.Private.CoreLib.wasm": "sha256-X3bq/iADkhXKOcOpOiU/3mEIGbmq+r+wrT4/3DHS6oc=",
"System.Private.Uri.wasm": "sha256-j9I2C6q9tDLnCspj5+DTUAbyKHFa1C69WnFfB8uQ/Oo=",
"System.Runtime.InteropServices.JavaScript.wasm": "sha256-6Oqs8L93R7wNrMlueKJpSy0X7D1KaiU2sKdUZRVzs8s=",
"System.Runtime.Numerics.wasm": "sha256-QwmK4A4lI/KNTFyOWBggt+2bGwOtFxFxR0Avij8BOSY=",
"System.Runtime.wasm": "sha256-I9XGusJ8aDA4TgcW+TOdTMOy5HnhBKEzAfbrlcDWDJs=",
"System.Text.Encodings.Web.wasm": "sha256-UYhOrJJSqJDC7P9uB+0jvediLoY22erQ+yuqCIk4Xfo=",
"System.Text.Json.wasm": "sha256-uArOIjJS0lubwiog9nSgba+2d0/Dfotz1emKnljvRYI=",
"System.Text.RegularExpressions.wasm": "sha256-xYq4kfQq01W36AFbEFd+pmcjw81FgQC6cukDUwgKZjs=",
"System.Threading.wasm": "sha256-4ldNQZfx9+SOZxTdU9g9Xfzdnb+GxLTPbWMsCHfQm7g="
}
},
"cacheBootResources": true,
"debugLevel": 0,
"linkerEnabled": true,
"globalizationMode": "sharded"
}
Binary file added Jint/_framework/blazor.boot.json.br
Binary file not shown.
Binary file added Jint/_framework/blazor.boot.json.gz
Binary file not shown.
Binary file added Jint/_framework/browser.pdb.gz
Binary file not shown.
Binary file added Jint/_framework/browser.wasm
Binary file not shown.
Binary file added Jint/_framework/browser.wasm.br
Binary file not shown.
Binary file added Jint/_framework/browser.wasm.gz
Binary file not shown.
4 changes: 4 additions & 0 deletions Jint/_framework/dotnet.js

Large diffs are not rendered by default.

Binary file added Jint/_framework/dotnet.js.br
Binary file not shown.
Binary file added Jint/_framework/dotnet.js.gz
Binary file not shown.
17 changes: 17 additions & 0 deletions Jint/_framework/dotnet.native.8.0.10.nt3v235mvd.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file added Jint/_framework/dotnet.native.wasm
Binary file not shown.
Binary file added Jint/_framework/dotnet.native.wasm.br
Binary file not shown.
Binary file added Jint/_framework/dotnet.native.wasm.gz
Binary file not shown.
4 changes: 4 additions & 0 deletions Jint/_framework/dotnet.runtime.8.0.10.1v4nyb1010.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file added Jint/_framework/icudt_CJK.dat
Binary file not shown.
Binary file added Jint/_framework/icudt_CJK.dat.br
Binary file not shown.
Binary file added Jint/_framework/icudt_CJK.dat.gz
Binary file not shown.
Binary file added Jint/_framework/icudt_EFIGS.dat
Binary file not shown.
Binary file added Jint/_framework/icudt_EFIGS.dat.br
Binary file not shown.
Binary file added Jint/_framework/icudt_EFIGS.dat.gz
Binary file not shown.
Binary file added Jint/_framework/icudt_no_CJK.dat
Binary file not shown.
Binary file added Jint/_framework/icudt_no_CJK.dat.br
Binary file not shown.
Binary file added Jint/_framework/icudt_no_CJK.dat.gz
Binary file not shown.
32 changes: 32 additions & 0 deletions Jint/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTTP request for Jint: JavaScript implemented in .Net</title>
<script type="module" src="main.js"></script>
</head>
<body>
<h2>HTTP Request from inside WASM using Jint JavaScript interpreter</h2>

<p>This example uses <a href="https://github.com/sebastienros/jint">Jint</a>.</p>
<p>See the output in browser developer console.</p>

<p>Actual code:</p>
<pre>

http.get('https://httpbin.org/anything');

</pre>
<section>
<h4>Info</h4>
<ul>
<li><a href="https://github.com/wasm-outbound-http-examples/js-in-dotnet/tree/main/browser-and-node-Jint/browser/">Demo source code</a></li>
<li>Versions used on the moment of build:<small>
Jint: <a href="https://github.com/sebastienros/jint/releases/tag/v4.0.3">v4.0.3</a>,
.NET SDK: 8.0.402
</small></li>
</ul>
</section>
<footer><small>Created for (wannabe-awesome) <a href="https://github.com/vasilev/HTTP-request-from-inside-WASM">list</a></small></footer>
</body>
</html>
3 changes: 3 additions & 0 deletions Jint/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { dotnet } from './_framework/dotnet.js';

await dotnet.run();
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTTP request from inside WASM in JavaScript implemented in DotNet - index of demos</title>
</head>
<body>
<h2>HTTP request from inside WASM in JavaScript implemented in .NET - list of demos</h2>

<ol>
<li><a href="Jint/">Demo using Jint JavaScript interpreter</a></li>
</ol>

</body>
</html>

0 comments on commit 246090b

Please sign in to comment.