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" />
                    
Directory.Packages.props
<PackageReference Include="Maanfee.JsInterop" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=Maanfee.JsInterop&version=1.13.0
                    
Install as a Cake Tool

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 element
  • QuerySelectorAll(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 value
  • CssAsync<T>(string propertyName) - Get CSS property value (returns string or IList<string>)
Class Methods
  • AddClassAsync(string className) - Add CSS class to elements
  • RemoveClassAsync(string className) - Remove CSS class from elements
  • ToggleClassAsync(string className) - Toggle CSS class on elements
  • HasClassAsync(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 mode
  • ExitFullscreenAsync() - Exit fullscreen mode
  • ToggleFullscreenAsync(string elementId = null) - Toggle fullscreen mode
  • IsFullscreenAsync() - Check if fullscreen is active
  • GetFullscreenElementAsync() - Get current fullscreen element ID
Events
  • FullscreenChanged - Event raised when fullscreen state changes

LocalStorage Service

Basic Operations
  • ClearAsync() - Clear all local storage data
  • KeyAsync(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 stream
  • DownloadFileFromUrl(string fileName, string url) - Download file from URL
  • PrintAsync(string id) - Print HTML element with full style preservation
Product 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.

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.

Version Downloads Last Updated
1.13.0 484 5/9/2026
1.10.0 660 12/10/2025
1.4.1 272 12/7/2025