Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/IconInfo.cs
MDN Reference: IconInfo on MDN
https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchUpdateUIEvent/updateUI#icons https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchManager/fetch#icons
| Property | Type | Access | Description |
|---|---|---|---|
IconInfo |
class |
get | https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchUpdateUIEvent/updateUI#icons https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchManager/fetch#icons |
Sizes |
string? |
get | |
Type |
string? |
get | |
Label |
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<IconInfo>(...)or constructornew IconInfo(...)
addEventListener("backgroundfetchsuccess", (event) => {
event.updateUI({
title: "Episode 5 ready to listen!",
icon: {
src: "path/to/success.ico",
sizes: "16x16 32x32 64x64",
},
});
});