Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions features/feature-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Feature policy
description: The `Feature-Policy` response header sets whether a policy-controlled feature, such as an API, may be used in a document. Not to be confused with permissions policy.
Comment thread
ddbeck marked this conversation as resolved.
spec: https://www.w3.org/TR/2019/WD-feature-policy-1-20190416/
caniuse: feature-policy
discouraged:
reason: Feature policy is superseded by permissions policy.
according_to:
- https://github.com/w3c/webappsec-permissions-policy/pull/379
alternatives:
- permissions-policy
status:
compute_from:
- http.headers.Feature-Policy
- api.Document.featurePolicy
- api.HTMLIFrameElement.featurePolicy
compat_features:
- http.headers.Feature-Policy
- http.headers.Feature-Policy.accelerometer
- http.headers.Feature-Policy.ambient-light-sensor
- http.headers.Feature-Policy.attribution-reporting
- http.headers.Feature-Policy.autoplay
- http.headers.Feature-Policy.bluetooth
- http.headers.Feature-Policy.browsing-topics
- http.headers.Feature-Policy.camera
- http.headers.Feature-Policy.compute-pressure
- http.headers.Feature-Policy.cross-origin-isolated
- http.headers.Feature-Policy.deferred-fetch
- http.headers.Feature-Policy.deferred-fetch-minimal
- http.headers.Feature-Policy.display-capture
- http.headers.Feature-Policy.document-domain
- http.headers.Feature-Policy.encrypted-media
- http.headers.Feature-Policy.fullscreen
- http.headers.Feature-Policy.geolocation
- http.headers.Feature-Policy.gyroscope
- http.headers.Feature-Policy.hid
- http.headers.Feature-Policy.identity-credentials-get
- http.headers.Feature-Policy.idle-detection
- http.headers.Feature-Policy.local-fonts
- http.headers.Feature-Policy.magnetometer
- http.headers.Feature-Policy.microphone
- http.headers.Feature-Policy.midi
- http.headers.Feature-Policy.otp-credentials
- http.headers.Feature-Policy.payment
- http.headers.Feature-Policy.picture-in-picture
- http.headers.Feature-Policy.publickey-credentials-create
- http.headers.Feature-Policy.publickey-credentials-get
- http.headers.Feature-Policy.screen-wake-lock
- http.headers.Feature-Policy.serial
- http.headers.Feature-Policy.storage-access
- http.headers.Feature-Policy.usb
- http.headers.Feature-Policy.web-share
- http.headers.Feature-Policy.wildcards
- http.headers.Feature-Policy.window-management
- http.headers.Feature-Policy.xr-spatial-tracking
- api.Document.featurePolicy
- api.FeaturePolicy
- api.FeaturePolicy.allowedFeatures
- api.FeaturePolicy.allowsFeature
- api.FeaturePolicy.features
- api.FeaturePolicy.getAllowlistForFeature
- api.HTMLIFrameElement.featurePolicy
199 changes: 199 additions & 0 deletions features/feature-policy.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
# Generated from: feature-policy.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "74"
chrome_android: "74"
edge: "79"
compat_features:
# baseline: false
# support:
# chrome: "60"
# chrome_android: "60"
# edge: "79"
- http.headers.Feature-Policy
- http.headers.Feature-Policy.payment
- http.headers.Feature-Policy.usb

# baseline: false
# support:
# chrome: "62"
# chrome_android: "62"
# edge: "79"
- http.headers.Feature-Policy.fullscreen

# baseline: false
# support:
# chrome: "64"
# chrome_android: "64"
# edge: "79"
- http.headers.Feature-Policy.autoplay
- http.headers.Feature-Policy.camera
- http.headers.Feature-Policy.encrypted-media
- http.headers.Feature-Policy.geolocation
- http.headers.Feature-Policy.microphone
- http.headers.Feature-Policy.midi

# baseline: false
# support:
# chrome: "66"
# chrome_android: "66"
# edge: "79"
- http.headers.Feature-Policy.accelerometer
- http.headers.Feature-Policy.gyroscope

# baseline: false
# support:
# chrome: "69"
# chrome_android: "105"
# edge: "79"
- http.headers.Feature-Policy.picture-in-picture

# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support:
# chrome: "74"
# chrome_android: "74"
# edge: "79"
- api.Document.featurePolicy
- api.FeaturePolicy
- api.FeaturePolicy.allowedFeatures
- api.FeaturePolicy.allowsFeature
- api.FeaturePolicy.features
- api.FeaturePolicy.getAllowlistForFeature
- api.HTMLIFrameElement.featurePolicy

# baseline: false
# support:
# chrome: "79"
# chrome_android: "79"
# edge: "79"
- http.headers.Feature-Policy.xr-spatial-tracking

# baseline: false
# support:
# chrome: "84"
# chrome_android: "84"
# edge: "84"
- http.headers.Feature-Policy.publickey-credentials-create
- http.headers.Feature-Policy.publickey-credentials-get
- http.headers.Feature-Policy.screen-wake-lock

# baseline: false
# support:
# chrome: "86"
# chrome_android: "86"
# edge: "86"
- http.headers.Feature-Policy.web-share

# baseline: false
# support:
# chrome: "87"
# chrome_android: "87"
# edge: "87"
- http.headers.Feature-Policy.cross-origin-isolated

# baseline: false
# support:
# chrome: "89"
# chrome_android: "89"
# edge: "89"
- http.headers.Feature-Policy.serial

# baseline: false
# support:
# chrome: "93"
# chrome_android: "84"
# edge: "93"
- http.headers.Feature-Policy.otp-credentials

# baseline: false
# support:
# chrome: "94"
# chrome_android: "94"
# edge: "94"
- http.headers.Feature-Policy.display-capture
- http.headers.Feature-Policy.idle-detection

# baseline: false
# support:
# chrome: "100"
# chrome_android: "100"
# edge: "100"
- http.headers.Feature-Policy.window-management

# baseline: false
# support:
# chrome: "104"
# chrome_android: "104"
# edge: "104"
- http.headers.Feature-Policy.bluetooth

# baseline: false
# support:
# chrome: "108"
# chrome_android: "108"
# edge: "108"
- http.headers.Feature-Policy.wildcards

# baseline: false
# support:
# chrome: "110"
# chrome_android: "110"
# edge: "110"
- http.headers.Feature-Policy.identity-credentials-get

# baseline: false
# support:
# chrome: "113"
# chrome_android: "113"
# edge: "113"
- http.headers.Feature-Policy.storage-access

# baseline: false
# support:
# chrome: "115"
# chrome_android: "115"
# edge: "115"
- http.headers.Feature-Policy.browsing-topics

# baseline: false
# support:
# chrome: "117"
# chrome_android: "117"
# edge: "117"
- http.headers.Feature-Policy.attribution-reporting

# baseline: false
# support:
# chrome: "135"
# chrome_android: "135"
# edge: "135"
- http.headers.Feature-Policy.deferred-fetch
- http.headers.Feature-Policy.deferred-fetch-minimal

# baseline: false
# support:
# chrome: "89"
# edge: "89"
- http.headers.Feature-Policy.hid

# baseline: false
# support:
# chrome: "103"
# edge: "103"
- http.headers.Feature-Policy.local-fonts

# baseline: false
# support:
# chrome: "125"
# edge: "125"
- http.headers.Feature-Policy.compute-pressure

# baseline: false
# support: {}
- http.headers.Feature-Policy.ambient-light-sensor
- http.headers.Feature-Policy.document-domain
- http.headers.Feature-Policy.magnetometer
2 changes: 0 additions & 2 deletions features/iframe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ status:
compute_from: html.elements.iframe
compat_features:
- api.HTMLIFrameElement
- api.HTMLIFrameElement.allow
- api.HTMLIFrameElement.contentDocument
- api.HTMLIFrameElement.contentWindow
- api.HTMLIFrameElement.getSVGDocument
Expand All @@ -15,7 +14,6 @@ compat_features:
- api.HTMLIFrameElement.src
- api.HTMLIFrameElement.width
- html.elements.iframe
- html.elements.iframe.allow
- html.elements.iframe.height
- html.elements.iframe.name
- html.elements.iframe.src
Expand Down
14 changes: 0 additions & 14 deletions features/iframe.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,3 @@ compat_features:
# safari: "3.1"
# safari_ios: "2"
- api.HTMLIFrameElement.getSVGDocument

# baseline: high
# baseline_low_date: 2020-07-28
# baseline_high_date: 2023-01-28
# support:
# chrome: "60"
# chrome_android: "60"
# edge: "79"
# firefox: "74"
# firefox_android: "79"
# safari: "11.1"
# safari_ios: "11.3"
- api.HTMLIFrameElement.allow
- html.elements.iframe.allow
9 changes: 9 additions & 0 deletions features/permissions-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Permissions policy
description: The `Permissions-Policy` response header and the `allow` attribute for `<iframe>` elements sets whether a policy-controlled feature, such as an API, may be used in a document.
spec: https://w3c.github.io/webappsec-permissions-policy/
caniuse: permissions-policy
compat_features:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also suggest moving the allow attribute into here, yanking it from the iframe feature.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with b65c5e7.

- api.HTMLIFrameElement.allow
- html.elements.iframe.allow
- http.headers.Permissions-Policy
- http.headers.Permissions-Policy.wildcards
38 changes: 38 additions & 0 deletions features/permissions-policy.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated from: permissions-policy.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "108"
chrome_android: "108"
edge: "108"
compat_features:
# baseline: high
# baseline_low_date: 2020-07-28
# baseline_high_date: 2023-01-28
# support:
# chrome: "60"
# chrome_android: "60"
# edge: "79"
# firefox: "74"
# firefox_android: "79"
# safari: "11.1"
# safari_ios: "11.3"
- api.HTMLIFrameElement.allow
- html.elements.iframe.allow

# baseline: false
# support:
# chrome: "88"
# chrome_android: "88"
# edge: "88"
- http.headers.Permissions-Policy

# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support:
# chrome: "108"
# chrome_android: "108"
# edge: "108"
- http.headers.Permissions-Policy.wildcards
4 changes: 4 additions & 0 deletions scripts/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ const defaultAllowlist: allowlistItem[] = [
[
"https://github.com/WebAssembly/branch-hinting/blob/main/proposals/branch-hinting/Overview.md",
"Allowed because there is no other specification to link to."
],
[
"https://www.w3.org/TR/2019/WD-feature-policy-1-20190416/",
"Allowed because feature policy was replaced by permissions policy."
]
];

Expand Down