Class DeprecationReportBody
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalDeprecationReportBody interface of the Reporting API represents the body of a deprecation report.
[Value("DeprecationReportBody")]
public class DeprecationReportBody : ReportBody
- Inheritance
-
DeprecationReportBody
- Inherited Members
Remarks
A deprecation report is generated when a deprecated feature (for example a deprecated API method) is used on a document being observed by a ReportingObserver. In addition to the support of this API, receiving useful deprecation warnings relies on browser vendors adding these warnings for deprecated features.
Constructors
DeprecationReportBody()
public DeprecationReportBody()
Properties
AnticipatedRemoval
NOTE
ExperimentalanticipatedRemoval read-only property of the DeprecationReportBody interface returns the date that the browser version which removes the feature will ship. This value can be used to prioritize warnings. If this property returns null because the date is unknown, then the deprecation should be considered low priority.
[Value("anticipatedRemoval")]
public Object? AnticipatedRemoval { get; }
Property Value
Remarks
ColumnNumber
NOTE
ExperimentalcolumnNumber read-only property of the DeprecationReportBody interface returns the line in the source file in which the deprecated feature was used.
[Value("columnNumber")]
public ulong? ColumnNumber { get; }
Property Value
- ulong?
An integer, or
nullif the column is not known.
Remarks
NOTE
This property is most useful alongside SourceFile and LineNumber as it enables the location of the column in that file and line where the error occurred.
Id
NOTE
Experimentalid read-only property of the DeprecationReportBody interface returns a string representing the feature or API that is deprecated. This can be used to group or count related reports.
[Value("id")]
public string Id { get; }
Property Value
- string
A string.
Remarks
LineNumber
NOTE
ExperimentallineNumber read-only property of the DeprecationReportBody interface returns the line in the source file in which the deprecated feature was used.
[Value("lineNumber")]
public ulong? LineNumber { get; }
Property Value
- ulong?
An integer, or
nullif the line is not known.
Remarks
NOTE
This property is most useful alongside SourceFile as it enables the location of the line in that file where the error occurred.
Message
NOTE
Experimentalmessage read-only property of the DeprecationReportBody interface returns a human-readable description of the deprecation. This typically matches the message a browser will display in its DevTools console regarding a deprecated feature.
[Value("message")]
public string Message { get; }
Property Value
- string
A string.
Remarks
SourceFile
NOTE
ExperimentalsourceFile read-only property of the DeprecationReportBody interface returns the path to the source file where the deprecated feature was used.
[Value("sourceFile")]
public string? SourceFile { get; }
Property Value
- string
A string, or
nullif the path is not known.
Remarks
NOTE
This property can be used with LineNumber and ColumnNumber to locate the column and line in the file where the error occurred.
Methods
ToJSON()
NOTE
ExperimentaltoJSON() method of the DeprecationReportBody interface is a serializer, and returns a JSON representation of the InterventionReportBody object.
[Value("toJSON")]
public Object ToJSON()
Returns
- Object
A JSON object that is the serialization of the DeprecationReportBody object.