Class PerformanceElementTiming
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalPerformanceElementTiming interface contains render timing information for image and text node elements the developer annotated with an elementtiming attribute for observation.
[Value("PerformanceElementTiming")]
public class PerformanceElementTiming : PerformanceEntry, PaintTimingMixin
- Inheritance
-
PerformanceElementTiming
- Implements
- Inherited Members
Remarks
-elementtiming HTML attribute
Constructors
PerformanceElementTiming()
public PerformanceElementTiming()
Properties
Element
NOTE
Experimentalelement read-only property of the PerformanceElementTiming interface returns an Element which is a pointer to the observed element.
[Value("element")]
public Element? Element { get; }
Property Value
- Element
An Element, or
nullif the element is a shadow DOM element.
Remarks
Id
NOTE
Experimentalid read-only property of the PerformanceElementTiming interface returns the id of the associated element.
[Value("id")]
public string Id { get; }
Property Value
- string
A string.
Remarks
Identifier
NOTE
Experimentalidentifier read-only property of the PerformanceElementTiming interface returns the value of the elementtiming attribute on the element.
[Value("identifier")]
public string Identifier { get; }
Property Value
- string
A string.
Remarks
IntersectionRect
NOTE
ExperimentalintersectionRect read-only property of the PerformanceElementTiming interface returns the rectangle of the element within the viewport.
[Value("intersectionRect")]
public DOMRectReadOnly IntersectionRect { get; }
Property Value
- DOMRectReadOnly
A DOMRectReadOnly which is the rectangle of the element within the viewport.For display images this is the display rectangle of the image within the viewport. For text this is the display rectangle of the node in the viewport. This being the smallest rectangle that contains the union of all text nodes that belong to the element.
Remarks
LoadTime
NOTE
ExperimentalloadTime read-only property of the PerformanceElementTiming interface always returns 0 for text. For images it returns the time which is the latest between the time the image resource is loaded and the time it is attached to the element.
[Value("loadTime")]
public Number LoadTime { get; }
Property Value
Remarks
NaturalHeight
NOTE
ExperimentalnaturalHeight read-only property of the PerformanceElementTiming interface returns the intrinsic height of the image element.
[Value("naturalHeight")]
public ulong NaturalHeight { get; }
Property Value
- ulong
An unsigned 32-bit integer (unsigned long) which is the intrinsic height of the image if this is applied to an image,
0for text.
Remarks
NaturalWidth
NOTE
ExperimentalnaturalWidth read-only property of the PerformanceElementTiming interface returns the intrinsic width of the image element.
[Value("naturalWidth")]
public ulong NaturalWidth { get; }
Property Value
- ulong
An unsigned 32-bit integer (unsigned long) which is the intrinsic width of the image if this is applied to an image,
0for text.
Remarks
RenderTime
NOTE
ExperimentalrenderTime read-only property of the PerformanceElementTiming interface returns the render time of the associated element.
[Value("renderTime")]
public Number RenderTime { get; }
Property Value
- Number
A Number with the render time of the element.For images this will be the image rendering timestamp. This is defined as the next paint that occurs after the image becomes fully loaded. If the timing allow check fails (as defined by the Timing-allow-origin header) this will return
0.For text nodes this will be the text rendering timestamp. This is defined as when the element becomes text painted.
Remarks
Url
NOTE
Experimentalurl read-only property of the PerformanceElementTiming interface returns the initial URL of the resource request when the element is an image.
[Value("url")]
public string Url { get; }
Property Value
- string
A string which is the initial URL of the resources request for images or
0for text.
Remarks
Methods
ToJSON()
NOTE
ExperimentaltoJSON() method of the PerformanceElementTiming interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the PerformanceElementTiming object.
[Value("toJSON")]
public Object ToJSON()
Returns
- Object
A {{jsxref("JSON")}} object that is the serialization of the PerformanceElementTiming object.The JSON doesn't contain the Element property because it is of type Element, which doesn't provide a
toJSON()operation. The Id of the element is provided, though.