diff --git a/index.html b/index.html index bff6d25..4194ddf 100644 --- a/index.html +++ b/index.html @@ -147,16 +147,14 @@

"https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler"> EventHandler -
  • - - EventTarget -
  • queue a task
  • +
  • + EventTarget +
  • fires @@ -177,6 +175,21 @@

    "https://html.spec.whatwg.org/multipage/browsers.html#browsing-context">browsing context

  • +
  • + relevant + global object +
  • +
  • + relevant + settings object +
  • +
  • + current + settings object +
  • @@ -187,6 +200,11 @@

    "https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object"> incumbent settings object

  • +
  • + associated + Document +
  • Promise @@ -199,6 +217,10 @@

    SecurityError

  • +
  • + NotAllowedError +
  • DOMException @@ -208,6 +230,37 @@

    "https://www.w3.org/TR/secure-contexts/#secure-context">secure context

  • +
  • + active + document +
  • +
  • + origin +
  • +
  • + same + origin-domain +
  • +
  • + allowed + to use +
  • +
  • + + policy-controlled feature +
  • +
  • + feature + name +
  • +
  • + default + allowlist +
  • @@ -259,17 +312,26 @@

    the following steps:

      -
    1. 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. -
    2. -
    3. 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. +
    4. If the relevant settings object of this Navigator + 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. +
    5. +
    6. If this Navigator object's relevant global object's + associated Document is not allowed to use + the battery feature, then reject this Navigator + object's battery promise with a "NotAllowedError" + DOMException, return this Navigator object's battery + promise and abort these steps. +
      + In other words, this step rejects if the associated + Document's browsing context's active + document's origin is not same origin-domain with + the origin of the current settings object of this + Navigator object, unless specifically allowed by the + document's feature policy. +
    7. If this Navigator object's battery promise is not null, return this Navigator object's battery @@ -486,6 +548,18 @@

    +
    +

    + Feature Policy integration +

    +

    + The Battery Status API is a policy-controlled feature identified + by the string "battery". It's default allowlist is + 'self'. When disabled in a document, the + getBattery() method MUST return a promise + which rejects with a "SecurityError" DOMException. +

    +

    Examples