Re: [battery] Allow use in same-origin children, add Feature Policy integration

So Chrome doesn't currently restrict `getBattery` at all. Fully complying with this change would block the API in Chrome:

  - in all insecure contexts
  - in any frame which is at a different origin than its parent  (without an appropriate feature policy)
  - in any frame which is at a different origin than the top-level document (again, without an appropriate feature policy)

If we add counters for those situations, then we should have a good idea how much usage would be broken by adopting this change (and also adopting the current spec as-is).

(Also, this is Chrome-specific, but both [caniuse](http://caniuse.com/#search=getBattery) and the [API confluence dashboard](https://web-confluence.appspot.com/#!/catalog?releaseKeys=%5B%22Safari_11.0_OSX_10.12.6%22,%22Chrome_61.0.3163.79_Windows_10.0%22,%22Firefox_55.0_Windows_10.0%22,%22Edge_15.15063_Windows_10.0%22%5D&releaseOptions=null&numAvailable=null&currentPage=0&gap=5&itemPerPage=15&searchKey=%22getbattery%22) suggest that the API is not implemented anywhere else -- if that's wrong, it could change the 'web-compatible' calculation quite a bit)

-- 
GitHub Notification of comment by clelland
Please view or discuss this issue at https://github.com/w3c/battery/pull/13#issuecomment-338703297 using your GitHub account

Received on Monday, 23 October 2017 15:46:11 UTC