Skip to content

LibWeb: Add basics of PermissionsAPI#8874

Draft
NiccoloAntonelliDziri wants to merge 1 commit intoLadybirdBrowser:masterfrom
NiccoloAntonelliDziri:permission
Draft

LibWeb: Add basics of PermissionsAPI#8874
NiccoloAntonelliDziri wants to merge 1 commit intoLadybirdBrowser:masterfrom
NiccoloAntonelliDziri:permission

Conversation

@NiccoloAntonelliDziri
Copy link
Copy Markdown
Contributor

This adds the basic infrastructure for the Permissions API, including the Permissions and PermissionStatus interfaces. The API is exposed via navigator.permissions on both Window and WorkerGlobalScope.

  • is_permission_supported is hardcoded to return false.
  • The query() method checks for a secure context but rejects all queries since no powerful features are supported yet.

@NiccoloAntonelliDziri NiccoloAntonelliDziri force-pushed the permission branch 6 times, most recently from 60917cc to 9a32cf0 Compare April 12, 2026 17:42
This adds the basic infrastructure for the Permissions API, including
the `Permissions` and `PermissionStatus` interfaces. The API is exposed
via `navigator.permissions` on both `Window` and `WorkerGlobalScope`.

- `is_permission_supported` is hardcoded to return false.
- The `query()` method checks for a secure context but rejects all
queries since no powerful features are supported yet.

Passes a few more subtests in `permissions/`.

https://wpt.live/permissions/idlharness.any.html

https://wpt.live/permissions/idlharness.any.worker.html

https://wpt.live/permissions/edge-cases.https.html

This one behaves differently because now the `query` property is
defined. And the last subtest passes for the wrong reason.
"Querying "fullscreen" permission with "allowWithoutGesture" false
is unsupported"
but in fact everything is currently unsupported.

https://wpt.live/fullscreen/api/permission.tentative.https.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant