Interface nsIContentPermissionRequestType

Interface allows access to a content to request permission to perform a privileged operation such as geolocation.

Hierarchy

Properties

element: Element
hasValidTransientUserGestureActivation: boolean
isRequestDelegatedToUnsafeThirdParty: boolean

See nsIPermissionDelegateHandler.maybeUnsafePermissionDelegate.

principal: nsIPrincipal

The principal of the permission request.

topLevelPrincipal: nsIPrincipal

The principal of the top-level page the permission request comes from.

types: nsIArray

The array will include the request types. Elements of this array are nsIContentPermissionType object.

window: mozIDOMWindow

The window or element that the permission request was originated in. Typically the element will be non-null in when using out of process content. window or element can be null but not both.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • choices: any

    Returns void

  • allow or cancel the request

    Returns void

  • Get delegate principal of the permission request. This will return nullptr, or request's principal or top level principal based on the delegate policy will be applied for a given type.

    Parameters

    • aType: string

      the permission type to get

    Returns nsIPrincipal

Generated using TypeDoc