Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/PaymentCurrencyAmount.cs
MDN Reference: PaymentCurrencyAmount on MDN
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/total#value
| Property | Type | Access | Description |
|---|---|---|---|
PaymentCurrencyAmount |
class |
get/set | https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/total#value |
Value |
string |
get | A string containing a decimal monetary value, e.g., 2.55. |
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<PaymentCurrencyAmount>(...)or constructornew PaymentCurrencyAmount(...)
self.addEventListener("paymentrequest", (e) => {
console.log(e.total);
});