[w3c/permissions] WebDriver BiDi: `permissions.PermissionDescriptor`'s CDDL does not allow feature-specific descriptor members (Issue #488)

whimboo created an issue (w3c/permissions#488)

The [`permissions.PermissionDescriptor` type](https://w3c.github.io/permissions/#webdriver-bidi-type-permissions-PermissionDescriptor) is defined as:

```
    permissions.PermissionDescriptor = {
      name: text,
    }
```

CDDL maps are closed by default, so a descriptor such as `{"name": "midi", "sysex": true}` or `{"name": "push", "userVisibleOnly": true}` does not match this type.

However, the [remote end steps for `permissions.setPermission`](https://w3c.github.io/permissions/#webdriver-bidi-command-permissions-setPermission) convert |descriptor| to the feature's own permission descriptor type, which can have more members. The spec's own WebDriver classic example uses `{name: "midi", sysex: true}`. Firefox passes the whole object through to that conversion, so it already accepts extra members.

Proposal: if feature-specific members are meant to be allowed, make the map extensible:

```
    permissions.PermissionDescriptor = {
      name: text,
      Extensible
    }
```

Related: the step that generates the permission key uses |descriptor|, the raw map, and not |typedDescriptor|. It probably should use the converted descriptor, so that feature-specific key generation algorithms receive a typed value.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/488
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/permissions/issues/488@github.com>

Received on Wednesday, 28 October 2026 17:08:53 UTC