Namespace: SpawnDev.SpawnJS.JSObjects
Inherits: SpawnJSObject
Source: JSObjects/Ink.cs
MDN Reference: Ink on MDN
The Ink interface of the Ink API provides access to InkPresenter objects for the application to use to render ink strokes. https://developer.mozilla.org/en-US/docs/Web/API/Ink
| Signature | Description |
|---|---|
Ink(SpawnJSObjectReference _ref) |
Deserialization constructor |
| Method | Return Type | Description |
|---|---|---|
RequestPresenter(InkPresenterParam param) |
Task<InkPresenter> |
The requestPresenter() method of the Ink interface returns a Promise that fulfills with an InkPresenter object. |
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<Ink>(...)or constructornew Ink(...)
async function inkInit() {
const ink = navigator.ink;
let presenter = await ink.requestPresenter({ presentationArea: canvas });
// …
}