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

Specification

Editor's draft

Status in Chromium

Blink>FeaturePolicy


Origin trial (tracking bug) in:

  • Chrome for desktop release 69
  • Chrome for Android release 69
  • Android WebView release 69

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-08-24