Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebIDL fix: initialize PerformanceEntry instead of shadowing #383

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 9 additions & 58 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,60 +420,6 @@ <h3>
{{RenderBlockingStatusType}} <a data-dfn-for=
"PerformanceResourceTiming"><dfn>render-blocking status</dfn></a>.
</p>
<p>
The <a>PerformanceResourceTiming</a> interface participates in the
<a data-cite=
"PERFORMANCE-TIMELINE-2#performance-timeline">Performance
Timeline</a> and extends the following attributes of the
<code><dfn data-cite=
"PERFORMANCE-TIMELINE-2#the-performanceentry-interface">PerformanceEntry</dfn></code>
interface:
</p>
<dl data-link-for="PerformanceResourceTiming">
<dt>
<dfn>name</dfn>
</dt>
<dd>
The <a>name</a> getter steps are to return <a>this</a>'s
<a data-for="PerformanceResourceTiming">requested URL</a>.
</dd>
<dt>
<dfn>entryType</dfn>
</dt>
<dd>
The <a>entryType</a> getter steps are to return the DOMString
"<code>resource</code>".
</dd>
<dt>
<dfn>startTime</dfn>
</dt>
<dd>
<p data-dfn-for="PerformanceResourceTiming">
The <a>startTime</a> getter steps are to <a>convert fetch
timestamp</a> for <a>this</a>'s <a data-for=
"PerformanceResourceTiming">timing info</a>'s [=fetch timing
info/start time=] and <a>this</a>'s <a>relevant global
object</a>.
</p>
<p class='note'>
`startTime` is measured right at the start of the [=fetch=],
before any redirects. See <a data-cite=
"FETCH#fetching">fetching</a>.
</p>
</dd>
<dt>
<dfn>duration</dfn>
</dt>
<dd>
<p data-dfn-for="PerformanceResourceTiming">
The <a>duration</a> getter steps are to return <a>this</a>'s
<a data-for="PerformanceResourceTiming">timing info</a>'s [=fetch
timing info/end time=] minus <a>this</a>'s <a data-for=
"PerformanceResourceTiming">timing info</a>'s [=fetch timing
info/start time=].
</p>
</dd>
</dl>
<p data-dfn-for="PerformanceResourceTiming">
When <dfn>toJSON</dfn> is called, run [[WEBIDL]]'s <a data-cite=
"WEBIDL#default-tojson-operation">default toJSON operation</a>.
Expand Down Expand Up @@ -899,15 +845,12 @@ <h3>
</li>
</ol>
<p>
To <dfn>add a PerformanceResourceTiming entry</dfn> into the
To <dfn>add a PerformanceResourceTiming entry</dfn> <i>new entry</i> into the
<a data-cite=
'PERFORMANCE-TIMELINE-2/#dfn-performance-entry-buffer'>performance
entry buffer</a>, run the following steps:
</p>
<ol>
<li>Let <i>new entry</i> be the input <a>PerformanceEntry</a> to be
added.
</li>
<li>If <a>can add resource timing entry</a> returns true and
<a>resource timing buffer full event pending flag</a> is false, run
the following substeps:
Expand Down Expand Up @@ -1185,6 +1128,7 @@ <h2>
<li>Create a <a>PerformanceResourceTiming</a> object |entry| in
|global|'s [=global object/realm=].
</li>

<li>
<a>Setup the resource timing entry</a> for |entry|, given
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|,
Expand Down Expand Up @@ -1214,6 +1158,13 @@ <h2>
<li>Assert that |cacheMode| is the empty string,
"<code>local</code>", or "<code>validated</code>".
</li>

<li>[=initialize a PerformanceEntry|Initialize=] |entry| given
the result of <a data-lt="convert fetch timestamp">converting</a> |timingInfo|'s
clelland marked this conversation as resolved.
Show resolved Hide resolved
[=fetch timing info/start time=], "<code>resource</code>",
|requestedURL|, and the result of <a data-lt="convert fetch timestamp">converting</a>
|timingInfo|'s [=fetch timing info/end time=].
</li>
<li>Set |entry|'s <a data-for="PerformanceResourceTiming">initiator
type</a> to |initiatorType|.
</li>
Expand Down
Loading