PermissionsPolicy Class
The policy object of a document or of an iframe element (https://w3c.github.io/webappsec-permissions-policy/#the-policy-object, document.permissionsPolicy and iframe.permissionsPolicy): the introspection of the permissions policy of the document, or of the policy that a document loaded into the iframe would inherit.
public sealed class PermissionsPolicyMethods
| Name | Description |
|---|---|
| AllowedFeatures() | Returns the tokens of the features allowed by the policy for the origin of the document, or for the declared origin of the iframe (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-allowedfeatures). |
| AllowsFeature(string, string?) | Returns whether a feature is allowed by the policy for an origin (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-allowsfeature). |
| Features() | Returns the tokens of the supported features (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-features). |
| GetAllowlistForFeature(string) | Returns the allowlist of a feature (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-getallowlistforfeature): *, or the serialization of the origins and the source expressions of the declared policy of the document (of the allow attribute of the iframe). It is empty when the feature is not allowed. A feature that is not declared has its default allowlist: *, or the origin of the document (the declared origin of the iframe). |
AllowedFeatures()
PermissionsPolicy.csReturns the tokens of the features allowed by the policy for the origin of the document, or for the declared origin of the iframe (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-allowedfeatures).
public IReadOnlyList<string> AllowedFeatures()AllowsFeature(string, string?)
PermissionsPolicy.csReturns whether a feature is allowed by the policy for an origin (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-allowsfeature).
Features()
PermissionsPolicy.csReturns the tokens of the supported features (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-features).
public IReadOnlyList<string> Features()GetAllowlistForFeature(string)
PermissionsPolicy.csReturns the allowlist of a feature (https://w3c.github.io/webappsec-permissions-policy/#dom-permissionspolicy-getallowlistforfeature): *, or the serialization of the origins and the source expressions of the declared policy of the document (of the allow attribute of the iframe). It is empty when the feature is not allowed. A feature that is not declared has its default allowlist: *, or the origin of the document (the declared origin of the iframe).
public IReadOnlyList<string> GetAllowlistForFeature(string feature)