From 72ee57ff77a97e9f712184366969ce51158d5cd2 Mon Sep 17 00:00:00 2001 From: Kenneth Rohde Christiansen Date: Wed, 20 Nov 2024 10:19:13 +0100 Subject: [PATCH] Make ownContributionEstimate experimental --- index.html | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index d8cb792..aeba5ee 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,24 @@ ul li::marker { font-family: "Segoe UI Emoji", "Noto Color Emoji"; } + .experimental { + display: none; + } +

The Compute Pressure API provides a way for websites to react to changes @@ -940,11 +957,15 @@

The PressureRecord interface

interface PressureRecord { readonly attribute PressureSource source; readonly attribute PressureState state; - readonly attribute double? ownContributionEstimate; readonly attribute DOMHighResTimeStamp time; [Default] object toJSON(); }; +
+    partial interface PressureRecord {
+      readonly attribute double? ownContributionEstimate;
+    };
+  

A constructed {{PressureRecord}} object has the following internal slots:

@@ -955,7 +976,7 @@

The PressureRecord interface

  • a [[\State]] value of type {{PressureState}}, which represents the current [=pressure state=].
  • -
  • +
  • an [[\OwnContributionEstimate]] value of type double?, which represents an estimated percentage (value between 0 and 1) of the current web site contribution to the global pressure for the current source. @@ -987,7 +1008,7 @@

    The state attribute

    The {{PressureRecord/state}} [=getter steps=] are to return its {{PressureRecord/[[State]]}} internal slot.

  • -
    +

    The ownContributionEstimate attribute

    The {{PressureRecord/ownContributionEstimate}} [=getter steps=] are to return its {{PressureRecord/[[OwnContributionEstimate]]}} internal slot. @@ -1242,7 +1263,7 @@

    Supporting algorithms

    The has change in data steps given the argument |observer:PressureObserver|, |source:PressureSource|, - |state:PressureState|. |ownContributionEstimate:double?|, are as follows: + |state:PressureState|, |ownContributionEstimate:double?|, are as follows:
    1. If |observer|.{{PressureObserver/[[LastRecordMap]]}}[|source|] does not [=map/exist=], return true. @@ -1253,7 +1274,7 @@

      Supporting algorithms

    2. If |record|.{{PressureRecord/[[State]]}} is not equal to |state|, return true.
    3. -
    4. +
    5. If |record|.{{PressureRecord/[[OwnContributionEstimate]]}} is not equal to |ownContributionEstimate|, return true.
    6. @@ -1423,7 +1444,7 @@

      Data Collection and Delivery

    7. Let |state:PressureState| be null.
    8. -
    9. +
    10. Let |ownContributionEstimate| be null.
    11. @@ -1453,7 +1474,7 @@

      Data Collection and Delivery

    12. -
    13. +
    14. If the [=user agent=] can calculate an |estimation| of the current site's contribution to the overall pressure in an [=implementation-defined=] manner, given |sample|'s [=pressure source sample/data=], then set |ownContributionEstimate| @@ -1485,14 +1506,17 @@

      Data Collection and Delivery

      returns false, [=iteration/continue=].
    15. - If running [=has change in data=] with |observer|, |source|, |state| and |ownContributionEstimate| + If running [=has change in data=] with |observer|, |source|, |state| + and |ownContributionEstimate| returns false, [=iteration/continue=].
    16. Let |record:PressureRecord| be a new {{PressureRecord}} object with its {{PressureRecord/[[Source]]}} set to |source|, {{PressureRecord/[[State]]}} set to |state|, - {{PressureRecord/[[OwnContributionEstimate]]}} set to |ownContributionEstimate| + + {{PressureRecord/[[OwnContributionEstimate]]}} set to |ownContributionEstimate| + and {{PressureRecord/[[Time]]}} set to |timeValue|.