Maanfee.JsInterop
1.13.0
dotnet add package Maanfee.JsInterop --version 1.13.0
NuGet\Install-Package Maanfee.JsInterop -Version 1.13.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Maanfee.JsInterop" Version="1.13.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Maanfee.JsInterop" Version="1.13.0" />
<PackageReference Include="Maanfee.JsInterop" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Maanfee.JsInterop --version 1.13.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Maanfee.JsInterop, 1.13.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Maanfee.JsInterop@1.13.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Maanfee.JsInterop&version=1.13.0
#tool nuget:?package=Maanfee.JsInterop&version=1.13.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Maanfee JsInterop
Maanfee JsInterop is a JavaScript interop library for Blazor applications that provides jQuery-like DOM manipulation capabilities through C#.
π―Features
- π¬ DOM Selection: Query single or multiple elements using CSS selectors
- π§ Content Manipulation: Get/set text content, HTML content, and input values
- π¦ Fluent API: Chainable methods for concise code
- β‘ Type Safety: Strongly typed return values
- ποΈ Async Support: Full asynchronous operation support
- π― Frame Accuracy - Precise frame navigation and seeking capabilities
- π₯οΈ Fullscreen API - Comprehensive fullscreen control with event support
- πΎ Local Storage - Full local storage operations with type safety
- π Clipboard API - Read, write, and clear clipboard content with HTML support
- π₯ File Download - Download files from streams and URLs
- π¨οΈ Print Service - Print HTML elements with style preservation
π οΈ API Reference
Core Services
Dom Service
DOM Selection
QuerySelector(string selector)- Select single elementQuerySelectorAll(string selector)- Select multiple elements
Content Manipulation
Text Methods
TextAsync<T>()- Get text content (returns string or IList<string>)TextAsync(string text)- Set text content
HTML Methods
HTMLAsync<T>()- Get HTML content (returns string or IList<string>)HTMLAsync(string html)- Set HTML content
Value Methods
ValAsync<T>()- Get input value (returns string or IList<string>)ValAsync(string value)- Set input value
Attribute Methods
AttrAsync<T>(string attributeName)- Get attribute value (returns string or IList<string>)AttrAsync(string attributeName, string attributeValue)- Set attribute value
CSS Methods
CssAsync(string propertyName, string value)- Set CSS property valueCssAsync<T>(string propertyName)- Get CSS property value (returns string or IList<string>)
Class Methods
AddClassAsync(string className)- Add CSS class to elementsRemoveClassAsync(string className)- Remove CSS class from elementsToggleClassAsync(string className)- Toggle CSS class on elementsHasClassAsync(string className)- Check if class exists (returns bool)HasClassAllAsync(string className)- Check class existence for all elements (returns IList<bool>)
Event Methods
ClickAsync()- Trigger click event on selected elements
Fullscreen Service
RequestFullscreenAsync(string elementId = null)- Request fullscreen modeExitFullscreenAsync()- Exit fullscreen modeToggleFullscreenAsync(string elementId = null)- Toggle fullscreen modeIsFullscreenAsync()- Check if fullscreen is activeGetFullscreenElementAsync()- Get current fullscreen element ID
Events
FullscreenChanged- Event raised when fullscreen state changes
LocalStorage Service
Basic Operations
ClearAsync()- Clear all local storage dataKeyAsync(int index)- Get key name at specified index (returns string)LengthAsync()- Get number of stored items (returns int?)RemoveAsync(string key)- Remove item by key
Read/Write Operations
GetAsync<T>(string key)- Get stored value by key with type safety (returns T)SetAsync<T>(string key, T value)- Store value with key (auto-serializes)KeysAsync()- Get all storage keys (returns List<string>)
Configuration
ConfigureJsonOptions(Action<JsonSerializerOptions> configure)- Configure JSON serialization settings globally
Clipboard Service
Write Operations
WriteTextAsync(string text)- Write text to clipboard (returns bool)WriteHtmlAsync(string html)- Write HTML to clipboard with plain text fallback (returns bool)
Read Operations
ReadTextAsync()- Read text from clipboard (returns string)
Utility Methods
IsSupportedAsync()- Check if Clipboard API is supported (returns bool)ClearAsync()- Clear clipboard content (returns bool)
FileDownload Service
Download Methods
DownloadFileFromStream(string fileName, DotNetStreamReference stream)- Download file from .NET streamDownloadFileFromUrl(string fileName, string url)- Download file from URL
Print Service
Print Methods
PrintAsync(string id)- Print HTML element with full style preservation
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.AspNetCore.Components (>= 10.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.7)
- Microsoft.JSInterop (>= 10.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Maanfee.JsInterop:
| Package | Downloads |
|---|---|
|
Maanfee.Dashboard.Core
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.