Skip to content

webhid compute_from api.HIDDevice.open #2681

@nondebug

Description

@nondebug

WebHID should be compute_from api.HIDDevice.open (record usage when script attempts to open a device) to match how it is recorded in Chromium.

compute_from: api.Navigator.hid

https://source.chromium.org/chromium/chromium/src/+/main:components/page_load_metrics/browser/observers/use_counter/webdx_feature_maps.cc;l=125;drc=98446c62425aae85d330b4be247b1336a292dda7

Usage of the navigator.hid attribute is misleading because script may access this to detect browser capabilities without intending to use those capabilities. HIDDevice.open is a much stronger usage signal as it can only be called after permission UI has been shown and the user has granted access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature definitionCreating or defining new features or groups of features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions