Table of Contents

Class PressureRecord

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The PressureRecord interface is part of the Compute Pressure API and describes the pressure trend of a source at a specific moment of transition.
[Value("PressureRecord")]
public class PressureRecord
Inheritance
PressureRecord
Inherited Members

Remarks

Constructors

PressureRecord()

public PressureRecord()

Properties

Source

NOTE
Experimental
The read-only source property is a string indicating the origin source from which the record is coming.
[Value("source")]
public PressureSource Source { get; }

Property Value

PressureSource

A string indicating the origin source from which the record is coming. The current version of the Compute Pressure API specification supports two main source types:Use the static KnownSources hint to see which source types are supported by your browser. Note that availability can also vary by your operating system and your hardware. Call Observe(PressureSource, PressureObserverOptions) and check for a NotSupportedError to see if pressure observation is possible.

Remarks

State

NOTE
Experimental
The read-only state property is a string indicating the pressure state recorded.
[Value("state")]
public PressureState State { get; }

Property Value

PressureState

A string indicating the pressure state recorded. The Compute Pressure API uses human-readable pressure states with the following semantics (see also the specification):

Remarks

Time

NOTE
Experimental
The read-only time property returns the {{domxref("DOMHighResTimeStamp","timestamp", "", "no-code")}} recorded for a PressureRecord. It corresponds to the time the data was obtained from the system relative to the time origin of the global object in which the PressureObserver generated the notification.
[Value("time")]
public Number Time { get; }

Property Value

Number

A Number representing the timestamp when the PressureRecord was created.

Remarks

Methods

ToJSON()

NOTE
Experimental
The toJSON() method is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the PressureRecord object.
[Value("toJSON")]
public Object ToJSON()

Returns

Object

A {{jsxref("JSON")}} object that is the serialization of the PressureRecord object.

Remarks