Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.49 KB

UpdateUIOptions.md

File metadata and controls

39 lines (30 loc) · 1.49 KB

UpdateUIOptions

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

Properties

Property Type Access Description
UpdateUIOptions class get https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchUpdateUIEvent/updateUI#options
Title string? get

Examples

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., readyState becomes ReadyState)
  • Events use ActionEvent with +=/-= (e.g., addEventListener("click", fn) becomes OnClick += handler)
  • Async methods return Task<T> instead of Promise<T>
  • Objects should be disposed with using statements
  • Access via JS.Get<UpdateUIOptions>(...) or constructor new UpdateUIOptions(...)
addEventListener("backgroundfetchsuccess", (event) => {
  event.updateUI({
    title: "Episode 5 ready to listen!",
    icon: {
      src: "path/to/success.ico",
      sizes: "16x16 32x32 64x64",
    },
  });
});

See full example on MDN