maui-hybridwebview

Embed local web content with bidirectional JavaScript–C# messaging in .NET MAUI apps.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/mkazimoto/AppMAUICopilot --skill maui-hybridwebview-mkazimoto
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: maui-hybridwebview
Source: https://github.com/mkazimoto/AppMAUICopilot/tree/main/.github/skills/maui-hybridwebview
Command: npx skills add https://github.com/mkazimoto/AppMAUICopilot --skill maui-hybridwebview-mkazimoto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables embedding local web content and bidirectional JavaScript–C# communication inside .NET MAUI apps using HybridWebView.

Core Features & Use Cases

  • Bidirectional interop between JavaScript and C#
  • Local web assets hosting under Resources/Raw/wwwroot
  • JavaScript-to-.NET callbacks and raw messaging

Quick Start

Create a HybridWebView in a MAUI page, set DefaultFile to the entry HTML, register a C# bridge for InvokeDotNet, and verify bidirectional messaging with your local web assets.

Frequently Asked Questions about maui-hybridwebview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call JavaScript from C# in a .NET MAUI app?▼

Bidirectional JavaScript–C# communication in .NET MAUI is enabled via HybridWebView, which sets up a JSON-serialized interop surface to invoke JS from C# and expose C# methods to JS.

How do I host local HTML and JavaScript content in a MAUI application?▼

Local HTML and JavaScript content is hosted in MAUI by configuring a web root at Resources/Raw/wwwroot and setting a DefaultFile entry point for the HybridWebView to render.

Can I expose C# methods to JavaScript using MAUI HybridWebView?▼

Yes, you can expose C# methods to JavaScript by registering an invoke bridge via SetInvokeJavaScriptTarget, which establishes a JSON-serialized interop surface for JavaScript-to-.NET callbacks.

What is the best way to set up bidirectional communication between local web assets and .NET MAUI?▼

The best way to set up bidirectional communication between local web assets and .NET MAUI is using HybridWebView with a registered invoke bridge and a configured web root to handle JSON-serialized messaging.

Does MAUI HybridWebView require a specific folder structure for local web content?▼

Yes, MAUI HybridWebView requires a specific folder structure where local web assets must be placed under the Resources/Raw/wwwroot directory to properly load and render the configured DefaultFile.