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
Fundamentals
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.
Concept
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.
Foundation
📝 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
}
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
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.
LimitedNot Baseline
Google ChromeCheck current Ink API / delegated ink support
Limited
Microsoft EdgeChromium Edge — check current Ink API status
Limited
OperaChromium-based — check current compat
Limited
Mozilla FirefoxTypically unavailable — verify on MDN
Unavailable
Apple SafariTypically unavailable — verify on MDN
Unavailable
inkLimited
Bottom line: Use navigator.ink as an optional stylus enhancement. Never require it for core drawing features.
Wrap Up
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.
Experimental Ink entry — request a presenter for snappier stylus trails.
5
Core concepts
🖋01
Returns
Ink object
Entry
⏱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.