Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.4 KB

File metadata and controls

32 lines (23 loc) · 1.4 KB

CookieSubscription

Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/CookieSubscription.cs
MDN Reference: CookieSubscription on MDN

https://developer.mozilla.org/en-US/docs/Web/API/CookieStoreManager/unsubscribe#subscriptions

Properties

Property Type Access Description
CookieSubscription class get https://developer.mozilla.org/en-US/docs/Web/API/CookieStoreManager/unsubscribe#subscriptions
Url 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<CookieSubscription>(...) or constructor new CookieSubscription(...)
const subscriptions = [{ name: "cookie1", url: `/path1` }];
await registration.cookies.unsubscribe(subscriptions);

See full example on MDN