JavaScript Navigator ink Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

navigator.ink is a read-only property that returns an Ink object for the current document — the entry point for the Ink API (MDN). Use it to get a DelegatedInkTrailPresenter for lower-latency pen/stylus strokes.

Read the notes below before you rely on this property. Prefer feature detection when support is limited.

Syntax

Use navigator.ink. Start with this line.

JavaScript
navigator.ink
CallWhat it does
navigator.inkPrimary signature.

Built into the browser. Read navigator.ink on Navigator — no import required.

Library declarations
JavaScript
navigator.ink

Parameters

ParameterDescription
requestPresenter()Required. Get a DelegatedInkTrailPresenter
presentationAreaOptional. Element border box; omit → viewport

Return Value

Return ValueDescription
*Ink object

JavaScript Examples

Example 1 — Feature-Detect

Check whether the Ink API is available before calling it.

JavaScript
const supported = "ink" in navigator;
console.log(supported ? "Ink API available" : "Ink API missing");
Try It Yourself

How It Works

  1. Use in. "ink" in navigator checks for the property.
  2. Expect limited support. Strongest historically in Chromium (Chrome, Edge, Opera).
  3. Treat as optional. Missing Ink must not break drawing.
  4. Keep a fallback. Pointer Events + canvas still do the real stroke.

Example 2 — requestPresenter()

Ask for a presenter tied to your canvas presentation area.

JavaScript
async function getPresenter(canvas) {
  if (!("ink" in navigator)) {
    console.log("unsupported");
    return null;
  }
  const presenter = await navigator.ink.requestPresenter({
    presentationArea: canvas
  });
  console.log("Presenter ready");
  return presenter;
}

getPresenter(document.querySelector("#c"));
Try It Yourself

How It Works

  1. Detect first. Exit early when ink is missing.
  2. Await requestPresenter. Returns a DelegatedInkTrailPresenter (MDN).
  3. Pass the canvas. presentationArea confines rendering to that element’s border box.
  4. Omit area carefully. No area / null defaults to the containing viewport.

Example 3 — Update Ink Trail

Draw the final point yourself, then ask the presenter to fill the gap until the next move.

JavaScript
const canvas = document.querySelector("#c");
const ctx = canvas.getContext("2d");
const style = { color: "lime", diameter: 10 };

let presenterPromise = null;
if ("ink" in navigator) {
  presenterPromise = navigator.ink.requestPresenter({
    presentationArea: canvas
  });
}

canvas.addEventListener("pointermove", async (evt) => {
  ctx.fillStyle = style.color;
  ctx.fillRect(evt.offsetX, evt.offsetY, 10, 10);

  if (!presenterPromise) return;
  const presenter = await presenterPromise;
  presenter.updateInkTrailStartPoint(evt, style);
});
Try It Yourself

How It Works

  1. Request once. Store the presenter Promise up front (MDN pattern).
  2. Draw the final stroke. Your canvas code remains the source of truth.
  3. Call updateInkTrailStartPoint. Pass the trusted pointer event and style.
  4. Skip when missing. Without Ink, Pointer Events alone still draw.

Browser Support

Navigator.ink (Ink API) is Experimental and Limited availability (not Baseline) on MDN. Use feature detection — do not assume every browser can delegate ink trails.

✓ Experimental · Not Baseline

Navigator.ink

Support is strongest in Chromium-based browsers (Chrome 94+, Edge 93+, Opera). Firefox and Safari typically omit the Ink API. Always feature-detect.

Limited Not Baseline
Google Chrome 94+ Ink API supported
Supported
Microsoft Edge 93+ Chromium Edge — Ink available
Supported
Opera 80+ Chromium-based — generally available
Supported
Mozilla Firefox Not typically available
Unavailable
Apple Safari Not typically available
Unavailable
navigator.ink Limited

Bottom line: Detect Ink, request a presenter for your canvas, update the trail on pointermove, and keep Pointer Events drawing as the fallback.

Frequently Asked Questions

It is a read-only Navigator property that returns an Ink object for the current document — the entry point to the Ink API for delegated ink trail presenters used in low-latency pen/stylus drawing (MDN).
Yes. MDN marks it Experimental and Limited availability (not Baseline). Always feature-detect and keep a normal Pointer Events + canvas fallback.
Ink.requestPresenter(options) returns a Promise that fulfills with a DelegatedInkTrailPresenter. Pass { presentationArea: canvas } so ink rendering is confined to that element’s border box (MDN).
Pointer events + canvas drawing can feel laggy with a stylus. Delegated ink trails let the OS/browser compositor draw a temporary trail between pointer events while your app catches up with the final stroke.
No. It is an enhancement. Finger or mouse drawing often works fine with Pointer Events alone. Use Ink when you care about stylus latency and the API is available.
No. It is read-only. You read the Ink object and call requestPresenter on it; you do not assign to navigator.ink.

Next: keyboard

Learn the navigator.keyboard entry for the Keyboard API.

keyboard tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful