Okojo.JavaScript.Embedding
0.2.0-preview.2
dotnet add package Okojo.JavaScript.Embedding --version 0.2.0-preview.2
NuGet\Install-Package Okojo.JavaScript.Embedding -Version 0.2.0-preview.2
<PackageReference Include="Okojo.JavaScript.Embedding" Version="0.2.0-preview.2" />
<PackageVersion Include="Okojo.JavaScript.Embedding" Version="0.2.0-preview.2" />
<PackageReference Include="Okojo.JavaScript.Embedding" />
paket add Okojo.JavaScript.Embedding --version 0.2.0-preview.2
#r "nuget: Okojo.JavaScript.Embedding, 0.2.0-preview.2"
#:package Okojo.JavaScript.Embedding@0.2.0-preview.2
#addin nuget:?package=Okojo.JavaScript.Embedding&version=0.2.0-preview.2&prerelease
#tool nuget:?package=Okojo.JavaScript.Embedding&version=0.2.0-preview.2&prerelease
Okojo.JavaScript.Embedding
Okojo.JavaScript.Embedding provides runtime composition and host integration
contracts for the Okojo.JavaScript ECMAScript engine. It does not select a
thread, task scheduler, event loop, worker host, or message serializer.
using Okojo.JavaScript.Embedding;
using var runtime = JsRuntime.Create();
Console.WriteLine(runtime.MainRealm.Evaluate("1 + 2"));
Add Okojo.Hosting, Okojo.WebPlatform, or another profile package when host
policy and platform APIs are needed.
Additional same-agent realms created with runtime.CreateRealm() share object references
without copying. When a browser document is replaced, runtime.ReleaseRealm(childRealm)
removes the runtime's registry ownership. Saved functions/objects and pending jobs remain
valid; the host must detach its document services separately. The main realm remains owned
until runtime disposal. Each realm has an independent module map; set
options.ModuleSourceLoader in runtime.CreateRealm(options => ...) to override its loader.
Module URLs and import.meta.url are unchanged. Cached modules do not independently root a
released realm through the agent, while retained namespace/function references remain valid.
agent.Modules diagnostics and invalidation default to the main realm; use their explicit
realm overloads to inspect or invalidate a child document's map.
Browser hosts can configure JsRealmOptions.GlobalThisObject while keeping realm-local global
bindings. The host integration JsWindowProxy supports same-agent retargeting and detachment;
create it in a long-lived anchor realm. See
host global-this for the contract and example.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Okojo.JavaScript (>= 0.2.0-preview.2)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Okojo.JavaScript.Embedding:
| Package | Downloads |
|---|---|
|
Okojo.Reflection
Reflection-based CLR interop extensions for Okojo runtimes. |
|
|
Okojo.WebPlatform
Portable web-platform APIs such as fetch, timers, workers, and host-installed globals for Okojo. |
|
|
Okojo.WebAssembly
Backend-agnostic WebAssembly integration APIs for Okojo runtimes. |
|
|
Okojo.Hosting
Hosting helpers, schedulers, queues, and worker infrastructure for Okojo runtimes. |
|
|
Okojo.DotNet.Modules
.NET ecosystem module-resolution and cache primitives for Okojo embedders. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0-preview.2 | 0 | 9/21/2026 |
| 0.2.0-preview.1 | 80 | 9/12/2026 |