Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/UpdateUIOptions.cs
MDN Reference: UpdateUIOptions on MDN
https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchUpdateUIEvent/updateUI#options
| Property | Type | Access | Description |
|---|---|---|---|
UpdateUIOptions |
class |
get | https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchUpdateUIEvent/updateUI#options |
Title |
string? |
get |
SpawnDev.SpawnJS Mapping Note: The JavaScript examples below show the standard Web API usage. In SpawnDev.SpawnJS, the same API is available with C# conventions:
- Properties and methods use PascalCase (e.g.,
readyStatebecomesReadyState)- Events use ActionEvent with
+=/-=(e.g.,addEventListener("click", fn)becomesOnClick += handler)- Async methods return
Task<T>instead ofPromise<T>- Objects should be disposed with
usingstatements- Access via
JS.Get<UpdateUIOptions>(...)or constructornew UpdateUIOptions(...)
addEventListener("backgroundfetchsuccess", (event) => {
event.updateUI({
title: "Episode 5 ready to listen!",
icon: {
src: "path/to/success.ico",
sizes: "16x16 32x32 64x64",
},
});
});