Skip to content

Commit

Permalink
define toJSON serializer
Browse files Browse the repository at this point in the history
Closes #82.

Discussion: w3c/resource-timing#112
  • Loading branch information
igrigorik committed Jul 21, 2017
1 parent 157d435 commit ec04827
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions index.html
Expand Up @@ -253,7 +253,7 @@ <h2>The <dfn>PerformanceEntry</dfn> interface</h2>
readonly attribute DOMString entryType;
readonly attribute DOMHighResTimeStamp startTime;
readonly attribute DOMHighResTimeStamp duration;
serializer = {attribute};
[Default] object toJSON();
};</pre>
<dl>
<dt><dfn>name</dfn></dt>
Expand All @@ -272,7 +272,7 @@ <h2>The <dfn>PerformanceEntry</dfn> interface</h2>
<dt><dfn>startTime</dfn></dt>
<dd>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
concept doesn't apply, a performance metric may choose to return a
`startTime` of <code>0</code>.</dd>
<dt><dfn>duration</dfn></dt>
<dd>This attribute MUST return the time value of the
Expand All @@ -283,10 +283,9 @@ <h2>The <dfn>PerformanceEntry</dfn> interface</h2>
performance metric may choose to return a `duration` of
<code>0</code>.</dd>
</dl>
<p>As a convenience for developers, instances of <a>PerformanceEntry</a>
include a <dfn>serializer</dfn>. When called, attributes are
<a data-cite="WEBIDL#dfn-convert-to-serialized-value">converted to
serialized values</a> as per [[!WEBIDL]].</p>
<p>When <dfn>toJSON</dfn> is called, run [[!WebIDL]]'s
<a data-cite="WEBIDL#default-tojson-operation">default toJSON
operation</a>.</p>
</section>
<section data-link-for="PerformanceObserver" data-dfn-for=
"PerformanceObserver">
Expand Down

0 comments on commit ec04827

Please sign in to comment.