Proposed interface:
https://docs.google.com/document/d/1xHEbR9ZTbHNqY9ituKKDxoZQbOZ3rpLfJ37U_JagdR4/edit#
1. Add a policy interface to document: This shows the policy which is in effect in the current scope. Boolean values for each feature supported by the user agent.
document.policy => {
"fullscreen": true,
"payment": false,
"vibrate": true
}
2. Add a secondary policy interface to frame nodes: This shows the policy which is inherited by the document inside the frame. This is explicitly not the final composed policy, as that could have been modified by the document itself, and knowing what it did to its inherited policy is a cross-origin information leak.
var frame = document.querySelector("iframe#specific-frame");
frame.policy => {
"fullscreen": true,
"payment": false,
"vibrate": false
}
Comment 1 by iclell...@chromium.org
, Jun 22 2017