Table of Contents

Class Report

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The Report interface of the Reporting API represents a single report.

[Value("Report")]
public class Report
Inheritance
Report
Inherited Members

Remarks

Reports can be accessed in a number of ways:

-Reporting API
-Report-To HTTP header

See also on MDN

Constructors

Report()

public Report()

Properties

Body

The body read-only property of the Report
interface returns the body of the report, which is a ReportBody object
containing the detailed report information.

[Value("body")]
public ReportBody? Body { get; }

Property Value

ReportBody

A ReportBody object containing the detailed report information. Depending
on what type the Report is, the object returned will
actually be a
DeprecationReportBody, InterventionReportBody, or
CSPViolationReportBody.
These all inherit from the base ReportBody class — study their reference
pages for more information on what the particular report body types contain.

Remarks

Type

The type read-only property of the Report
interface returns the type of report generated, e.g., deprecation or
intervention.

[Value("type")]
public string Type { get; }

Property Value

string

A string representing the type of the report. Currently the available types are
deprecation, intervention, and crash.

Remarks

Url

The url read-only property of the Report
interface returns the URL of the document that generated the report.

[Value("url")]
public string Url { get; }

Property Value

string

A string representing the URL of the document that generated the report.

Remarks

Methods

ToJSON()

[Value("toJSON")]
public Object ToJSON()

Returns

Object