↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Exploring WebWindow examples for Blazor on desktop

The page presents WebWindow as an experimental cross-platform .NET Core library for running HTML, JavaScript, and WebAssembly in a local browser window. It uses it to show how Blazor WebAssembly can run on desktop without a web server and how the same desktop support fits the Blazor-everywhere idea.

Reading notes
#

  • WebWindow is an experimental project by Steve Sanderson, with no stable packages, templates, or polished tooling yet.
  • Blazor WebAssembly can run without a web server because it only needs a rendering engine with WebAssembly support.
  • WebWindow uses an existing browser or web renderer to open a local window and load the web app there.
  • The experimental implementation works on Windows with Chromium-based Edge, on Linux with WebKit, and on Mac with Safari.
  • The sample solution includes HelloWorldApp, VueFileExplorer, and BlazorDesktopApp.
  • HelloWorldApp creates a WebWindow, loads a local index.html file, and waits until the window closes.
  • VueFileExplorer shows two-way communication between the web view and the hosting .NET Core process through OnWebMessageReceived and SendMessage.
  • In VueFileExplorer, the JavaScript UI sends commands such as navigateTo and showFile, and the host responds with directory or file data.
  • BlazorDesktopApp runs the default Blazor WebAssembly sample, including Counter and Fetch data views, inside a desktop window.
  • The weather forecast data in the Blazor desktop sample is read from wwwroot/sample-data/weather.json instead of being fetched with HttpClient.
  • The page treats WebWindow and desktop support as promising, while noting that the project is still early and experimental.