W3C home > Mailing lists > Public > public-device-apis-log@w3.org > July 2018

[battery] Checks on allowed usage are specced incorrectly

From: Domenic Denicola via GitHub <sysbot+gh@w3.org>
Date: Tue, 03 Jul 2018 14:44:24 +0000
To: public-device-apis-log@w3.org
Message-ID: <issues.opened-337931203-1530629063-sysbot+gh@w3.org>
domenic has just created a new issue for https://github.com/w3c/battery:

== Checks on allowed usage are specced incorrectly ==
(This seems related to #10, but it's focused more on the details, so I opened a new issue.)

> If the incumbent settings object is not a secure context, then reject this Navigator object's battery promise with a "SecurityError" DOMException, return this Navigator object's battery promise and abort these steps.

"incumbent settings object" should never be used by new specifications. I hope nobody implemented it this way. Instead, prefer the relevant settings object of this Navigator object.

See https://html.spec.whatwg.org/multipage/webappapis.html#realms-settings-objects-global-objects

(Thanks @TimothyGu for spotting this.)

> If the browsing context is not a top-level browsing context, then reject this Navigator object's battery promise with a "SecurityError" DOMException, return this Navigator object's battery promise and abort these steps.

What is "the browsing context"?

Probably you want, hmm, this Navigator object's [relevant global object](https://html.spec.whatwg.org/#concept-relevant-global)'s [associated Document](https://html.spec.whatwg.org/#concept-document-window)'s [browsing context](https://html.spec.whatwg.org/#concept-document-bc)?

Please view or discuss this issue at https://github.com/w3c/battery/issues/19 using your GitHub account
Received on Tuesday, 3 July 2018 14:44:27 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:55 UTC