Menu

Struct

PermissionRequest

kurogane::PermissionRequestSource
pub struct PermissionRequest { /* private fields */ }

A page asking for a device or a permission, passed to App::on_permission.

Methods

#pub fn origin(&self) -> &Origin

The origin that asks. It is the page’s, or a frame’s inside it when the frame asks.

#pub fn permissions(&self) -> &[Permission]

What the request asks for, all of it together. A page asking for a camera and a microphone at once is granted both or neither.

#pub fn browser(&self) -> Option<BrowserId>

The browser of the page that asks.

#pub fn responder(&self) -> PermissionResponder

A responder that answers this request later, from any thread, once the hook returns PermissionDecision::Later (after asking the user, for example). The responder does nothing after any other answer from the hook.

Trait implementations