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

Specification link


Specification being incubated in a Community Group

Status in Chromium

Blink>FeaturePolicy


Enabled by default (tracking bug)

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-05-13