W3C home > Mailing lists > Public > public-device-apis-log@w3.org > March 2017

Re: [battery] Allow use from within secure context and top-level browsing context only

From: Rijubrata Bhaumik via GitHub <sysbot+gh@w3.org>
Date: Thu, 16 Mar 2017 09:48:46 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-287006937-1489657725-sysbot+gh@w3.org>
Presently in getBattery(), there is a note that 
**The user agent must not reject the battery promise.**

We can fix this by rejecting the promise with "SecurityError" DOMException, if the incumbent settings object is not a secure context or a top-level browsing context.


-- 
GitHub Notification of comment by riju
Please view or discuss this issue at https://github.com/w3c/battery/issues/10#issuecomment-287006937 using your GitHub account
Received on Thursday, 16 March 2017 09:48:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 12:18:52 UTC