| title | API Documentation |
|---|---|
| section | AngleSharp.Wasm |
This page summarizes the currently available public API surface.
Extension methods are available on IConfiguration via AngleSharp.Wasm:
Registers the default Wasmtime-backed runtime factory.
var config = Configuration.Default.WithWasm();Registers a custom runtime factory creator.
Registers a host import provider.
Registers host imports via delegate.
When used with a scripting integration that discovers DOM attributes, the following surface is exposed under WebAssembly.
Compiles bytes and returns a WasmJsModule.
An overload accepts WasmCompileOptions.
Returns whether the bytes form a valid WebAssembly module without instantiating it.
Synchronously consumes a successful application/wasm response and returns a compiled WasmJsModule.
An overload accepts WasmCompileOptions.
Synchronously consumes a successful application/wasm response and returns a WasmJsInstantiationResult containing module and instance.
An overload accepts WasmCompileOptions.
Instantiates a compiled module and returns a WasmJsInstance.
Byte-array overloads compile and instantiate in one operation and return WasmJsInstantiationResult; compile options can be supplied.
builtins: requested builtin sets; currently the standardjs-stringvalue is recognized.importedStringConstants: module namespace for imported string constants.
Options are forwarded to runtimes implementing IWasmCompileOptionsCompiler. Wasmtime 44 does not expose either feature and rejects non-empty options.
Returns WasmModuleExportDescriptor[] with:
namekind(function,table,memory,global,tag)
Returns WasmModuleImportDescriptor[] with:
modulenamekind
Returns all matching custom section payloads as byte[][].
Returns a WasmJsExports object.
Invokes an exported function by name.
Returns an export entry by name:
WasmJsExportedFunctionfor function exportsWasmJsMemoryfor memory exportsWasmJsTablefor table exportsWasmJsGlobalfor global exportsWasmJsTagfor tag exportsWasmJsExportValuefor other non-function exportsnullif no export is found
Returns all export names.
Invokes the wrapped exported function.
Provides buffer, read(offset, count), write(offset, bytes), and grow(delta).
Provides length, get(index), set(index, value), and grow(delta, value). Function references returned by get(...) expose invoke(...).
Provides a value accessor and valueOf(). Assigning to an immutable global throws InvalidOperationException.
Can be constructed with an ordered array of WebAssembly value type names. Provides type(), whose descriptor exposes the tag's parameters.
Construct with a WasmJsTag and matching payload array. Provides is(tag) and getArg(tag, index) and can be thrown and caught as a .NET exception. Runtime-thrown Wasm exceptions are not available through the default Wasmtime 44 backend.
WasmJsCompileError, WasmJsLinkError, and WasmJsRuntimeError expose the standard CompileError, LinkError, and RuntimeError DOM names. Each can be constructed with an optional message. Bridge compilation, linking, and execution failures are translated automatically.
Descriptor type for non-function exports.
namekind
This API is intentionally focused on a practical subset of the full WebAssembly JS API spec. See Questions for limitations and expected behavior.
For a section-by-section status overview, see Spec Coverage Matrix.