Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/ScrollOptions.cs
MDN Reference: ScrollOptions on MDN
Window.Scroll() options https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll#options
| Property | Type | Access | Description |
|---|---|---|---|
ScrollOptions |
class |
get | Window.Scroll() options https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll#options |
Left |
int? |
get | |
Behavior |
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<ScrollOptions>(...)or constructornew ScrollOptions(...)
// Put the 100th vertical pixel at the top of the window
window.scroll(0, 100);window.scroll({
top: 100,
left: 100,
behavior: "smooth",
});