Table of Contents

Class PerformanceElementTiming

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The PerformanceElementTiming 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

Constructors

PerformanceElementTiming()

public PerformanceElementTiming()

Properties

Element

NOTE
Experimental
The element 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 null if the element is a shadow DOM element.

Remarks

Id

NOTE
Experimental
The id 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
Experimental
The identifier 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
Experimental
The intersectionRect 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
Experimental
The loadTime 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

Number

A Number with the loadTime of the element. Always 0 for text.

Remarks

NaturalHeight

NOTE
Experimental
The naturalHeight 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, 0 for text.

Remarks

NaturalWidth

NOTE
Experimental
The naturalWidth 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, 0 for text.

Remarks

RenderTime

NOTE
Experimental
The renderTime 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
Experimental
The url 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 0 for text.

Remarks

Methods

ToJSON()

NOTE
Experimental
The toJSON() 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.

Remarks