- From: Christian Liebel <notifications@github.com>
- Date: Wed, 20 May 2026 14:25:20 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/1231/4502765330@github.com>
christianliebel left a comment (w3ctag/design-reviews#1231) @domfarolino Thanks for reaching out. We agree with you that if an API is effectively per-Document, it should live on `document`. The TAG has been discussing a new design principle (https://github.com/w3ctag/design-principles/issues/448) to provide guidance on this question. Our response draws on that discussion and on the [HTML Standard](https://html.spec.whatwg.org/multipage/system-state.html#the-navigator-object), which states: > Instances of Navigator represent the identity and state of the user agent (the client). The model context does not fall into that category. Furthermore, the `navigator`-based alternative either pushes complexity onto implementations or conceals the document-scoped nature of the API behind reset logic. That doesn't seem worth it, especially given that a new `Document` object is created on every navigation anyway. We'd therefore recommend `document.modelContext`. Should WebMCP later gain worker support, a worker-only `self.modelContext` could be added. There's also precedent for this pattern: the `FontFaceSet` API is exposed as `document.fonts` and as `self.fonts` in workers (see [The `FontFaceSource` mixin](https://drafts.csswg.org/css-font-loading/#font-face-source)). -- Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/1231#issuecomment-4502765330 You are receiving this because you are subscribed to this thread. Message ID: <w3ctag/design-reviews/issues/1231/4502765330@github.com>
Received on Wednesday, 20 May 2026 21:25:23 UTC