From 43bcc7577a94bb02174ead3f877a373910ed40d4 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Date: Mon, 22 Jan 2024 08:03:26 +0000
Subject: [PATCH 1/4] The common atttribute of `PerformanceEntry` should be
initialized rather than inherited
Other specs should initialize startTime/entry/name/endTime
rather than provide overrides for them.
---
index.html | 49 +++++++++++++++++++++++++------------------------
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/index.html b/index.html
index 58bd63e..b908cc6 100644
--- a/index.html
+++ b/index.html
@@ -322,50 +322,51 @@ The PerformanceEntry interface
[Default] object toJSON();
};
- - id
- -
- This attribute MUST return the value of this's id.
-
- name
-
- This attribute MUST return an identifier for this
- PerformanceEntry object. This identifier does not have to be
- unique.
+ This attribute must return the value it is initialized to. It represents an identifier for
+ this PerformanceEntry object. This identifier does not have to be unique.
- entryType
-
- This attribute MUST return the type of the interface represented by
- this PerformanceEntry object.
+ This attribute must return the value it is initialized to.
+
All `entryType` values are defined in the
relevantregistry.
Examples include: "mark"
and "measure"
[[USER-TIMING-2]], "navigation"
[[NAVIGATION-TIMING-2]],
- "resource"
[[RESOURCE-TIMING-2]],
-
- and "longtask"
.
+ and "resource"
[[RESOURCE-TIMING-2]].
startTime
- This attribute MUST return the time value of the first recorded
- timestamp of this performance metric. If the startTime concept doesn't
- apply, a performance metric may choose to return a `startTime` of
- 0
.
+ This attribute must return the value it is initialized to. It represents the time value of
+ the first recorded timestamp of this performance metric. Its initial value is 0
.
duration
- This attribute MUST return the time value of the duration of the entire
- event being recorded by this PerformanceEntry. Typically, this
- would be the time difference between the last recorded timestamp and
- the first recorded timestamp of this PerformanceEntry. If the
- duration concept doesn't apply, a performance metric may choose to
- return a `duration` of 0
.
+ The getter steps for the duration attribute are to return 0 if this's endTime
+ is 0; otherwise this's endTime - this's startTime.
navigationId
- This attribute MUST return the value of this's navigationId.
+ This attribute MUST return the value of it is initialized to.
When toJSON is called, run [[WebIDL]]'s default toJSON
steps.
+
+ A PerformanceEntry has a {{DOMHighResTimeStamp}} endTime,
+ initially 0.
+
+
To initialize a PerformanceEntry entry given a {{DOMHighResTimeStamp}} startTime,
+ a DOMString
entryType, a DOMString
name, and an optional {{DOMHighResTimeStamp}} endTime (default 0
):
+
+
+ - Assert: entryType is defined in the entry type registry.
+
- Set entry's startTime to startTime.
+
- Set entry's entryType to entryType.
+
- Set entry's name to name.
+
- Set entry's endTime to endTime.
+
@@ -380,7 +381,7 @@ The PerformanceObserver interface
A PerformanceEntryList object called the observer
buffer that is initially empty.
- A DOMString
observer type which is initially
+ A DOMS observer type which is initially
"undefined"
.
A boolean requires dropped entries which is initially set to false.
From de10d7be46e7a10b306e5c2bef9cc92b1b92f9b3 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Date: Mon, 22 Jan 2024 15:13:19 +0000
Subject: [PATCH 2/4] nits
---
index.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index b908cc6..ac63e07 100644
--- a/index.html
+++ b/index.html
@@ -340,7 +340,7 @@ The PerformanceEntry interface
startTime
This attribute must return the value it is initialized to. It represents the time value of
- the first recorded timestamp of this performance metric. Its initial value is 0
.
+ the first recorded timestamp of this performance metric.
duration
The getter steps for the duration attribute are to return 0 if this's endTime
@@ -348,7 +348,7 @@ The PerformanceEntry interface
navigationId
- This attribute MUST return the value of it is initialized to.
+ This attribute MUST return the value it is initialized to.
When toJSON is called, run [[WebIDL]]'s default toJSON
@@ -381,7 +381,7 @@ The PerformanceObserver interface
A PerformanceEntryList object called the observer
buffer that is initially empty.
- A DOMS observer type which is initially
+ A DOMString
observer type which is initially
"undefined"
.
A boolean requires dropped entries which is initially set to false.
From 2f5db0638357dc0540885df455def2cffade3df2 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Date: Thu, 1 Feb 2024 10:36:16 +0000
Subject: [PATCH 3/4] fix error
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index ac63e07..8cb0768 100644
--- a/index.html
+++ b/index.html
@@ -354,7 +354,7 @@ The PerformanceEntry interface
When toJSON is called, run [[WebIDL]]'s default toJSON
steps.
- A PerformanceEntry has a {{DOMHighResTimeStamp}} endTime,
+
A PerformanceEntry has a {{DOMHighResTimeStamp}} endTime,
initially 0.
To initialize a PerformanceEntry entry given a {{DOMHighResTimeStamp}} startTime,
From 98303cf16d7493110b5afa07f4941ff67999c505 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Date: Fri, 2 Feb 2024 14:44:29 +0000
Subject: [PATCH 4/4] Update index.html
---
index.html | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/index.html b/index.html
index 8cb0768..25ab8df 100644
--- a/index.html
+++ b/index.html
@@ -362,10 +362,10 @@ The PerformanceEntry interface
- Assert: entryType is defined in the entry type registry.
-
- Set entry's startTime to startTime.
-
- Set entry's entryType to entryType.
-
- Set entry's name to name.
-
- Set entry's endTime to endTime.
+
- Initialize entry's startTime to startTime.
+
- Initialize entry's entryType to entryType.
+
- Initialize entry's name to name.
+
- Initialize entry's endTime to endTime.