JavaScript Navigator ink Property

Beginner
⏱️ 9 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Experimental

What You’ll Learn

navigator.ink is the entry point for the Ink API. Learn the Ink object, requestPresenter, delegated ink trails for smoother pen drawing, five examples, and try-it labs.

01

Kind

Read-only property

02

Returns

Ink object

03

Status

Experimental

04

Goal

Lower ink latency

05

Key method

requestPresenter()

06

Needs

Canvas area

Introduction

Drawing with a stylus on the web often feels slightly behind your hand. Your app receives pointer events, paints on a canvas, and the browser composites frames — each step adds a little delay.

The Ink API helps with that. navigator.ink returns an Ink object. From it you call requestPresenter() to get a DelegatedInkTrailPresenter that can render temporary ink strokes with less lag while your own canvas code finishes the final path.

💡
Enhancement, not a full paint engine

You still draw with canvas / WebGL for permanent strokes. Ink is about delegating the temporary trail so writing feels snappier on supporting devices.

Understanding the ink Property

Think of navigator.ink as the “front desk” for delegated ink trails in the current document.

  • Ink object — entry point returned by navigator.ink.
  • requestPresenter() — asks for a DelegatedInkTrailPresenter.
  • presentationArea — usually your drawing <canvas> element.
  • Delegated trail — system-assisted temporary stroke for lower latency.
  • Fallback — Pointer Events + canvas when the API is missing.

📝 Syntax

General form of the property:

JavaScript
navigator.ink

Value

  • An Ink object when the Ink API is available.
  • Missing / unavailable when the browser does not support it.

Common patterns

JavaScript
// MDN-style init:
async function inkInit(canvas) {
  if (!navigator.ink) {
    throw Error("Ink API not supported.");
  }
  const ink = navigator.ink;
  const presenter = await ink.requestPresenter({
    presentationArea: canvas
  });
  // Use presenter with your pointer drawing loop…
  return presenter;
}

// Safe feature-detect:
if ("ink" in navigator && navigator.ink) {
  // Ink entry point is available
}

⚡ Quick Reference

GoalCode
Get Ink entrynavigator.ink
Detect API"ink" in navigator && navigator.ink
Request presenterawait navigator.ink.requestPresenter({ presentationArea: canvas })
Same as MDNconst ink = navigator.ink;
Status (MDN)Experimental / not Baseline

🔍 At a Glance

Four facts to remember about navigator.ink.

Returns
Ink

API entry

Status
experimental

Not Baseline

Method
requestPresenter()

Async

For
stylus latency

Ink trails

📋 Ink API vs Pointer Events alone

Ink API (navigator.ink)Pointer Events + canvas
RoleDelegate temporary ink trailsReceive input & draw yourself
LatencyCan feel snappier on stylusDepends on your frame timing
SupportExperimental / limitedWidely available
Required?Optional enhancementDefault drawing path
Typical useNote apps, handwriting, sketchAll interactive drawing

Examples Gallery

Examples follow MDN navigator.ink / requestPresenter patterns. Prefer Try It Yourself in a supporting browser. Presenter setup needs a real <canvas>.

📚 Getting Started

Detect the API and read the Ink object.

Example 1 — Feature Detection

Check whether the Ink API entry point exists.

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

How It Works

If missing, keep drawing with Pointer Events only — do not block the sketch UI.

Example 2 — Read the Ink Object

Assign navigator.ink like MDN’s example and inspect its type.

JavaScript
if (!navigator.ink) {
  console.log("unsupported");
} else {
  const ink = navigator.ink;
  console.log("has requestPresenter: " +
    (typeof ink.requestPresenter === "function"));
}
Try It Yourself

How It Works

The valuable method on Ink for beginners is requestPresenter().

📈 Practical Patterns

Request a presenter for a canvas and wrap MDN’s init flow.

Example 3 — Request a Presenter

Pass your canvas as presentationArea (MDN pattern).

JavaScript
async function getPresenter(canvas) {
  if (!navigator.ink) {
    return "Ink API not supported.";
  }
  const presenter = await navigator.ink.requestPresenter({
    presentationArea: canvas
  });
  return "Presenter ready: " + (presenter.constructor?.name || "ok");
}

// In a page with :
// getPresenter(document.getElementById("c")).then(console.log);
Try It Yourself

How It Works

The try-it lab creates a canvas element and calls this flow for you.

Example 4 — MDN-Style inkInit

Full beginner init matching MDN’s sample structure.

JavaScript
async function inkInit(canvas) {
  const ink = navigator.ink;
  if (!ink) {
    throw Error("Ink API not supported.");
  }
  let presenter = await ink.requestPresenter({
    presentationArea: canvas
  });
  // …
  return presenter;
}

inkInit(document.createElement("canvas"))
  .then(function () { console.log("inkInit ok"); })
  .catch(function (err) {
    console.log(String(err.message || err));
  });
Try It Yourself

How It Works

After you have a presenter, wire pointer events and update strokes according to the Ink API docs for your target browser.

Example 5 — Capability Helper

Return a small status object for dashboards or drawing-app feature flags.

JavaScript
function inkStatus() {
  const available = Boolean(navigator.ink);
  return {
    available: available,
    hasRequestPresenter: available &&
      typeof navigator.ink.requestPresenter === "function",
    advice: available
      ? "Call requestPresenter({ presentationArea: canvas })"
      : "Fall back to Pointer Events + canvas drawing"
  };
}

console.log(JSON.stringify(inkStatus()));
Try It Yourself

How It Works

Use this before enabling a “low-latency ink” toggle in your note-taking UI.

🚀 Common Use Cases

  • Note-taking apps — handwriting that feels closer to paper.
  • Sketch / whiteboard tools — stylus strokes with less lag.
  • Signature pads — smoother pen capture on tablets.
  • Education — teach Ink as an optional layer over Pointer Events.
  • Progressive enhancement — Ink when present; canvas-only otherwise.

🧠 How navigator.ink Works

1

Detect the Ink entry

navigator.ink must exist in this browser.

Detect
2

Request a presenter

Pass your canvas as presentationArea.

Presenter
3

Draw with pointer events

Your app still owns the lasting stroke data.

Input
4

Delegated trail feels faster

Temporary ink can render with less lag when the OS/browser helps.

📝 Notes

  • Experimental and not Baseline — support is limited.
  • Not Deprecated or Non-standard on MDN.
  • Main method for beginners: requestPresenter({ presentationArea }).
  • Always keep a Pointer Events + canvas fallback.
  • Related: keyboard, hid, JavaScript hub.

Limited Browser Support

navigator.ink (Ink API) is Experimental and not Baseline. Availability is limited. Always feature-detect and keep a normal canvas drawing path.

Experimental · Not Baseline

Navigator.ink

Entry point for delegated ink trails. Detect the Ink object, request a presenter for your canvas, and fall back when unsupported.

Limited Not Baseline
Google Chrome Check current Ink API / delegated ink support
Limited
Microsoft Edge Chromium Edge — check current Ink API status
Limited
Opera Chromium-based — check current compat
Limited
Mozilla Firefox Typically unavailable — verify on MDN
Unavailable
Apple Safari Typically unavailable — verify on MDN
Unavailable
ink Limited

Bottom line: Use navigator.ink as an optional stylus enhancement. Never require it for core drawing features.

Conclusion

navigator.ink is the Ink API entry point for delegated ink trails. Feature-detect it, call requestPresenter() with your canvas, and keep Pointer Events drawing as the reliable default.

Continue with keyboard, hid, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Feature-detect navigator.ink first
  • Pass a real canvas as presentationArea
  • Keep Pointer Events + canvas as the base path
  • Handle requestPresenter failures with try/catch
  • Test with a stylus on supporting hardware

❌ Don’t

  • Assume every browser exposes Ink
  • Require Ink for basic sketching
  • Skip a fallback drawing implementation
  • Confuse Ink with a full graphics engine
  • Ignore experimental API changes over time

Key Takeaways

Knowledge Unlocked

Five things to remember about ink

Experimental Ink entry — request a presenter for snappier stylus trails.

5
Core concepts
02

Goal

Less latency

Stylus
🎨 03

Method

requestPresenter

Async
🖼 04

Needs

Canvas area

Area
🔬 05

Status

Experimental

Detect

❓ 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.
Yes. MDN marks it Experimental and not Baseline. Support is limited — always feature-detect and keep a normal canvas drawing fallback.
Ink.requestPresenter(options) returns a Promise that fulfills with a DelegatedInkTrailPresenter. You typically pass { presentationArea: canvas } so the browser/OS can help render ink strokes with less lag.
Pointer events + canvas drawing can feel laggy with a stylus. Delegated ink trails let the system draw a temporary ink path more quickly 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.
Did you know?

MDN’s example is tiny on purpose: get navigator.ink, then await ink.requestPresenter({ presentationArea: canvas }). The hard part of a note app is still your own stroke model — Ink only helps the temporary trail feel faster.

Explore keyboard Next

Learn layout maps and Keyboard Lock for games and apps.

keyboard →

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.

8 people found this page helpful