GO-V.ORG
As seen in

Ink: requestPresenter() method

Ink API

Ink API

The **`requestPresenter()`** method of the Ink interface returns a Promise that fulfills with a DelegatedInkTrailPresenter object to handle rendering strokes.

## Syntax

```js-nolint
requestPresenter(param)
```

### Parameters

- `param`
- : An object that contains the following property:
- `presentationArea`
- : 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 a DelegatedInkTrailPresenter 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

```js
async function inkInit() {
const ink = navigator.ink;
let presenter = await ink.requestPresenter({ presentationArea: canvas });

// …
}
```

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"Ink: requestPresenter() method". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/Ink/requestPresenter

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·