Feature Policy: JavaScript API

Expose JavaScript API for feature policy. document.policy.allowedFeatures() // what are the allowed features in this document document.policy.allowsFeature('geolocation', <origin>?) // is geolocation allowed in this document/origin? document.policy.getAllowlistForFeature('geolocation') // what origins are allowed to use geolocation?

Documentation

Status in Chromium

Blink>FeaturePolicy


In development (tracking bug)

Consensus & Standardization

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

  • No public signals
  • No public signals
  • No public signals
  • No signals

Owners

Last updated on 2018-05-30