Skip to content

Device Posture API #328

Open
Open

Description

@darktears

WebKittens

No response

Title of the spec

Device Posture API

URL to the spec

https://www.w3.org/TR/device-posture/

URL to the spec's repository

https://github.com/w3c/device-posture/

Issue Tracker URL

No response

Explainer URL

https://www.w3.org/TR/device-posture/#introduction

TAG Design Review URL

w3ctag/design-reviews#575

Mozilla standards-positions issue URL

mozilla/standards-positions#882

WebKit Bugzilla URL

No response

Radar URL

No response

Description

The Device Posture API is an API which helps targeting foldable devices. It provides developers the ability to query the posture of the device (through MQs or JavaScript) and provide a differentiated experience to the user. It does not expose the hinge angle sensor value but a set of "posture" which describe the current physical position of the device.

As this time this API applies only to Android and Windows OSes. Android provides the necessary OS APIs over here. Windows doesn't have an official API yet but instead relies on OEMs implementing the following specification in their middleware pre-installed software.

This API is to complimentary of the Viewport Segments which also helps targeting foldable devices (WebKit position requested over here).

This API is enabled by default on Samsung Internet.

Activity

  1. added
    from: Intel
    on Mar 6, 2024
  2. added
    topic: device apis
    on May 22, 2024
  3. bramus commented on Sep 20, 2026

    @bramus

    With the iPhone Duo recently announced, perhaps there is a position to share?

    Developers are actively asking about it.

    EDIT: With the feature available behind a flag in the 27.1 Simulator, I guess the question is answered :)

  4. added
    from: Microsoft
    from: Intel
    and removed
    from: Intel
    on Sep 21, 2026
  5. reillyeon commented on Oct 29, 2026

    @reillyeon

    Given that this API appears to be implemented in WebKit and that responding to this request for a position would no longer leak the impending release of the iPhone Duo the Devices and Sensors Working Group asks the WebKit team whether they have any feedback they would like to provide on this specification and the Viewport Segments specification.

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

Metadata

Metadata

Labels

from: Intelfrom: Microsofttopic: device apisvenue: W3C Devices and Sensors WG

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions