Permissions


How to use the Permissions class of the bit Butil?

Usage
To query the browser's permission state you need to inject the Bit.Butil.Permissions class and use it like this:
@inject Bit.Butil.Permissions permissions

@code {
    var state = await permissions.Query("geolocation");
}
Methods

IsSupported:
Returns whether the Permissions API (navigator.permissions) is available in the current browser (MDN).



Query:
Returns the current state (granted, denied, prompt or unknown) for a given permission descriptor name, without triggering a prompt (MDN).