A JavaScript API will be exposed for feature policy. This API contains three functions. document.featurePolicy.allowedFeatures() // What are the allowed features in this document? document.featurePolicy.allowsFeature('geolocation', <origin>?) // Is geolocation allowed in this document or origin? document.featurePolicy.getAllowlistForFeature('geolocation') // What origins are allowed to use geolocation?

Documentation

Specification

Editor's draft

Status in Chromium

Blink>FeaturePolicy


Enabled by default (tracking bug) in:

  • Chrome for desktop release 74
  • Chrome for Android release 74
  • Android WebView release 74

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • No signal
  • No signals

Owners

Search tags

feature policy,

Last updated on 2021-02-25