Interface nsIAddonPolicyServiceType

This interface allows the security manager to query custom per-addon security policy.

Hierarchy

Properties

defaultCSP: string

Returns the default content security policy which applies to extension documents which do not specify any custom policies.

defaultCSPV3: string

Same as above, but used for extensions using manifest v3.

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

  • Returns true if the addon was granted the |aPerm| API permission.

    Parameters

    • aAddonId: string
    • aPerm: string

    Returns boolean

  • Returns true if unprivileged code associated with the given addon may load data from |aURI|. If |aExplicit| is true, the permission and permissive host globs are ignored when checking for a match.

    Parameters

    • aAddonId: string
    • aURI: nsIURI
    • aExplicit: boolean

    Returns boolean

  • Maps an extension URI to the ID of the addon it belongs to.

    Parameters

    • aURI: nsIURI

    Returns string

  • Returns the base content security policy which applies to all extension resources.

    Parameters

    • aAddonId: string

    Returns string

  • Returns the name of the WebExtension with the given ID, or the ID string if no matching add-on can be found.

    Parameters

    • aAddonId: string

    Returns string

  • Returns the content security policy which applies to documents belonging to the extension with the given ID. This may be either a custom policy, if one was supplied, or the default policy if one was not.

    Parameters

    • aAddonId: string

    Returns string

  • Returns the generated background page as a data-URI, if any. If the addon does not have an auto-generated background page, an empty string is returned.

    Parameters

    • aAddonId: string

    Returns string

  • Returns true if a given extension:// URI is web-accessible and loadable by the source. This should be called if the protocol flags for the extension URI has URI_WEB_ACCESSIBLE.

    Parameters

    • aSourceURI: nsIURI
    • aExtensionURI: nsIURI

    Returns boolean

Generated using TypeDoc