web api instance method
Ink: requestPresenter() method
Limited availability
The requestPresenter() method of the Ink interface returns a Promise that fulfills with a DelegatedInkTrailPresenter object to handle rendering strokes.
Syntax
requestPresenter(param)
Parameters
paramOptional- : An object that contains the following property:
presentationAreaOptional- : An
Elementinside which rendering of ink strokes is confined (the element’s border box, to be precise). Ifparamis not included, orpresentationAreais set tonull, ink rendering is confined to the containing viewport by default.
- : An
- : An object that contains the following property:
Return value
A Promise that resolves to a DelegatedInkTrailPresenter object instance.
Exceptions
ErrorDOMException
Example
async function inkInit() {
const ink = navigator.ink;
let presenter = await ink.requestPresenter({ presentationArea: canvas });
// …
}
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.