kaios-types
    Preparing search index...

    Interface PermissionSettings

    permissions

    dom.mozPermissionSettings.enabled

    interface PermissionSettings {
        get(
            permission: string,
            manifestURI: string,
            origin: string,
            browserFlag: boolean,
        ): string;
        isExplicit(
            permission: string,
            manifestURI: string,
            origin: string,
            browserFlag: boolean,
        ): boolean;
        remove(permission: string, manifestURI: string, origin: string): void;
        set(
            permission: string,
            value: string,
            manifestURI: string,
            origin: string,
            browserFlag: boolean,
        ): void;
    }
    Index

    Methods

    • Gets the current permission value for a specific permission and origin.

      Parameters

      • permission: string

        The name of the permission to query (e.g., "geolocation").

      • manifestURI: string

        The manifest URI of the application.

      • origin: string

        The origin URI to check the permission for.

      • browserFlag: boolean

        Whether the permission check is for a browser element.

      Returns string

      The permission state (e.g., "allow", "deny", "prompt", "unknown").

    • Checks if a permission is explicitly set for a given origin.

      Parameters

      • permission: string

        The name of the permission to check.

      • manifestURI: string

        The manifest URI of the application.

      • origin: string

        The origin URI to check.

      • browserFlag: boolean

        Whether the check is for a browser element.

      Returns boolean

      True if the permission is explicitly set, false otherwise.

    • Removes a permission setting.

      Removing a permission is only allowed for pages with a different origin than the app and pages that have browserFlag=true, so remove() doesn't have a browserFlag parameter.

      Parameters

      • permission: string

        The name of the permission to remove.

      • manifestURI: string

        The manifest URI of the application.

      • origin: string

        The origin URI to remove the permission from.

      Returns void

    • Sets the permission value for a specific permission and origin.

      Parameters

      • permission: string

        The name of the permission to set.

      • value: string

        The value to set (e.g., "allow", "deny", "prompt").

      • manifestURI: string

        The manifest URI of the application.

      • origin: string

        The origin URI to set the permission for.

      • browserFlag: boolean

        Whether the permission setting is for a browser element.

      Returns void