Skip to content

Should immersive model presentation APIs live on Document or Navigator? #161

Open

Description

@cabanier

The proposed immersive model API extends Document with:

partial interface Document {
  readonly attribute boolean immersiveEnabled;
  readonly attribute Element? immersiveElement;
  Promise<undefined> exitImmersive();
  attribute EventHandler onimmersivechange;
  attribute EventHandler onimmersiveerror;
};

HTMLModelElement.requestImmersive() initiates presentation. Should the document-level API above instead live on Navigator, possibly through a dedicated interface?

Points to discuss:

  • Fullscreen exposes element state and exit on Document, whereas WebXR is accessed through navigator.xr. Which ownership model best fits immersive model presentation?
  • Availability can depend on the device, but the current model and its lifetime are tied to a document. Should capability detection and presentation control live on different interfaces?
  • If we use Navigator, how should document activation, navigation/removal cleanup, and event targets be specified?

WebKit currently places these members on Document. The proposal does not create a WebXR session or expose device tracking data.

References: Fullscreen API and WebXR Navigator extension.

This issue records an open design question; it does not propose moving the API yet.

Activity

  1. cabanier commented on Oct 14, 2026

    @cabanier
    MemberAuthor

    /tpac

  2. added
    TPAC
    on Oct 14, 2026
  3. cabanier commented on Nov 16, 2026

    @cabanier
    MemberAuthor

    @zachernuk we discussed this a bit during TPAC. Is Apple open to exposing these methods as a standard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TPAC

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions