Ink: requestPresenter() method
The requestPresenter() method of the Ink interface returns a Promise that fulfills with an InkPresenter object to handle rendering strokes.
Syntax
Parameters
param Optional
-
An InkPresenterParam object that contains the following property:
presentationArea Optional
-
An Element inside which rendering of ink strokes is confined (the element's border box, to be precise). If param is not included, or presentationArea is set to null, ink rendering is confined to the containing viewport by default.
Return value
A Promise that resolves to an InkPresenter object instance.
Exceptions
Error DOMException
-
An error is thrown and the operation is aborted if presentationArea is not a valid Element, or is not in the same document as the associated Ink object.
Example
async function inkInit() {
const ink = navigator.ink;
let presenter = await ink.requestPresenter({ presentationArea: canvas });
}
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
requestPresenter |
94 |
93 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
See also