Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8156,6 +8156,20 @@
/en-US/docs/Web/API/ByteLengthQueueingStrategy/size /en-US/docs/Web/API/ByteLengthQueuingStrategy/size
/en-US/docs/Web/API/ByteLengthQueuingStrategy/ByteLengthQueueingStrategy /en-US/docs/Web/API/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy
/en-US/docs/Web/API/ByteString /en-US/docs/Web/JavaScript/Reference/Global_Objects/String
/en-US/docs/Web/API/CSPViolationReport/toJSON /en-US/docs/Web/API/CSPViolationReport
/en-US/docs/Web/API/CSPViolationReportBody /en-US/docs/Web/API/CSPViolationReport
/en-US/docs/Web/API/CSPViolationReportBody/blockedURL /en-US/docs/Web/API/CSPViolationReport/blockedURL
/en-US/docs/Web/API/CSPViolationReportBody/columnNumber /en-US/docs/Web/API/CSPViolationReport/columnNumber
/en-US/docs/Web/API/CSPViolationReportBody/disposition /en-US/docs/Web/API/CSPViolationReport/disposition
/en-US/docs/Web/API/CSPViolationReportBody/documentURL /en-US/docs/Web/API/CSPViolationReport/documentURL
/en-US/docs/Web/API/CSPViolationReportBody/effectiveDirective /en-US/docs/Web/API/CSPViolationReport/effectiveDirective
/en-US/docs/Web/API/CSPViolationReportBody/lineNumber /en-US/docs/Web/API/CSPViolationReport/lineNumber
/en-US/docs/Web/API/CSPViolationReportBody/originalPolicy /en-US/docs/Web/API/CSPViolationReport/originalPolicy
/en-US/docs/Web/API/CSPViolationReportBody/referrer /en-US/docs/Web/API/CSPViolationReport/referrer
/en-US/docs/Web/API/CSPViolationReportBody/sample /en-US/docs/Web/API/CSPViolationReport/sample
/en-US/docs/Web/API/CSPViolationReportBody/sourceFile /en-US/docs/Web/API/CSPViolationReport/sourceFile
/en-US/docs/Web/API/CSPViolationReportBody/statusCode /en-US/docs/Web/API/CSPViolationReport/statusCode
/en-US/docs/Web/API/CSPViolationReportBody/toJSON /en-US/docs/Web/API/CSPViolationReport
/en-US/docs/Web/API/CSS.escape /en-US/docs/Web/API/CSS/escape_static
/en-US/docs/Web/API/CSS.supports /en-US/docs/Web/API/CSS/supports_static
/en-US/docs/Web/API/CSS/escape /en-US/docs/Web/API/CSS/escape_static
Expand Down Expand Up @@ -8384,6 +8398,21 @@
/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage /en-US/docs/Web/API/DedicatedWorkerGlobalScope/message_event
/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror /en-US/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event
/en-US/docs/Web/API/DelayNode.delayTime /en-US/docs/Web/API/DelayNode/delayTime
/en-US/docs/Web/API/DeprecationReport/anticipatedRemoval /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReport/columnNumber /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReport/id /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReport/lineNumber /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReport/message /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReport/sourceFile /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReport/toJSON /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody/anticipatedRemoval /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody/columnNumber /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody/id /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody/lineNumber /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody/message /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody/sourceFile /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/DeprecationReportBody/toJSON /en-US/docs/Web/API/DeprecationReport
/en-US/docs/Web/API/Detecting_device_orientation /en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation
/en-US/docs/Web/API/DeviceAcceleration /en-US/docs/Web/API/DeviceMotionEventAcceleration
/en-US/docs/Web/API/DeviceAcceleration.x /en-US/docs/Web/API/DeviceMotionEventAcceleration/x
Expand Down Expand Up @@ -9324,8 +9353,22 @@
/en-US/docs/Web/API/Int16Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array
/en-US/docs/Web/API/Int32Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array
/en-US/docs/Web/API/Int8Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array
/en-US/docs/Web/API/IntegrityViolationReportBody /en-US/docs/Web/API/IntegrityViolationReport
/en-US/docs/Web/API/IntersectionObserver/disconnect() /en-US/docs/Web/API/IntersectionObserver/disconnect
/en-US/docs/Web/API/IntersectionObserver/observe() /en-US/docs/Web/API/IntersectionObserver/observe
/en-US/docs/Web/API/InterventionReport/columnNumber /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReport/id /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReport/lineNumber /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReport/message /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReport/sourceFile /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReport/toJSON /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReportBody /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReportBody/columnNumber /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReportBody/id /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReportBody/lineNumber /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReportBody/message /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReportBody/sourceFile /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/InterventionReportBody/toJSON /en-US/docs/Web/API/InterventionReport
/en-US/docs/Web/API/KeyRange /en-US/docs/Web/API/IDBKeyRange
/en-US/docs/Web/API/KeyboardEvent.KeyboardEvent /en-US/docs/Web/API/KeyboardEvent/KeyboardEvent
/en-US/docs/Web/API/KeyboardEvent.altKey /en-US/docs/Web/API/KeyboardEvent/altKey
Expand Down Expand Up @@ -10134,6 +10177,12 @@
/en-US/docs/Web/API/RemotePlayback/onconnect /en-US/docs/Web/API/RemotePlayback/connect_event
/en-US/docs/Web/API/RemotePlayback/onconnecting /en-US/docs/Web/API/RemotePlayback/connecting_event
/en-US/docs/Web/API/RemotePlayback/ondisconnect /en-US/docs/Web/API/RemotePlayback/disconnect_event
/en-US/docs/Web/API/Report /en-US/docs/Web/API/ReportingObserver
/en-US/docs/Web/API/Report/body /en-US/docs/Web/API/ReportingObserver
/en-US/docs/Web/API/Report/type /en-US/docs/Web/API/ReportingObserver
/en-US/docs/Web/API/Report/url /en-US/docs/Web/API/ReportingObserver
/en-US/docs/Web/API/ReportBody /en-US/docs/Web/API/ReportingObserver
/en-US/docs/Web/API/ReportBody/toJSON /en-US/docs/Web/API/ReportingObserver
/en-US/docs/Web/API/ReportingObserverOptions /en-US/docs/Web/API/ReportingObserver
/en-US/docs/Web/API/Request/context /en-US/docs/Web/API/Request/destination
/en-US/docs/Web/API/RequestDestination /en-US/docs/Web/API/Request/destination
Expand Down
20 changes: 2 additions & 18 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -26244,7 +26244,7 @@
"chrisdavidmills"
]
},
"Web/API/DeprecationReportBody": {
"Web/API/DeprecationReport": {
"modified": "2020-10-15T22:16:17.596Z",
"contributors": ["chrisdavidmills"]
},
Expand Down Expand Up @@ -43363,7 +43363,7 @@
"modified": "2019-03-23T22:12:06.007Z",
"contributors": ["Sheppy", "Giveitup007"]
},
"Web/API/InterventionReportBody": {
"Web/API/InterventionReport": {
"modified": "2020-10-15T22:16:18.407Z",
"contributors": ["chrisdavidmills"]
},
Expand Down Expand Up @@ -54830,22 +54830,6 @@
"modified": "2020-10-15T22:09:06.275Z",
"contributors": ["sideshowbarker", "jpmedley"]
},
"Web/API/Report": {
"modified": "2020-10-15T22:16:18.021Z",
"contributors": ["chrisdavidmills"]
},
"Web/API/Report/body": {
"modified": "2020-10-15T22:16:16.430Z",
"contributors": ["chrisdavidmills"]
},
"Web/API/Report/type": {
"modified": "2020-10-15T22:16:18.423Z",
"contributors": ["chrisdavidmills"]
},
"Web/API/Report/url": {
"modified": "2020-10-15T22:16:17.693Z",
"contributors": ["chrisdavidmills"]
},
"Web/API/ReportingObserver": {
"modified": "2020-10-15T22:16:12.954Z",
"contributors": ["jpmedley", "chrisdavidmills"]
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/coepviolationreport/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Reports of this type can be observed from within a page using a {{domxref("Repor
## Instance properties

- `body`
- : The body of the report, containing more information about the violation.
- : The body of the report.
This is an object with the following properties:
- `type`
- : A string representing the cause of the violation that triggered the report.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: "CSPViolationReportBody: blockedURL property"
title: "CSPViolationReport: blockedURL property"
short-title: blockedURL
slug: Web/API/CSPViolationReportBody/blockedURL
slug: Web/API/CSPViolationReport/blockedURL
page-type: web-api-instance-property
browser-compat: api.CSPViolationReportBody.blockedURL
browser-compat: api.ReportingObserver.ReportingObserver.options_parameter.types_property.csp-violation
---

{{APIRef("Reporting API")}}

The **`blockedURL`** read-only property of the {{domxref("CSPViolationReportBody")}} interface is a string value that represents the resource that was blocked because it violates a [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP).
The **`blockedURL`** property of the {{domxref("CSPViolationReport")}} dictionary is a string value that represents the resource that was blocked because it violates a [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP).

## Value

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: "CSPViolationReportBody: columnNumber property"
title: "CSPViolationReport: columnNumber property"
short-title: columnNumber
slug: Web/API/CSPViolationReportBody/columnNumber
slug: Web/API/CSPViolationReport/columnNumber
page-type: web-api-instance-property
browser-compat: api.CSPViolationReportBody.columnNumber
browser-compat: api.ReportingObserver.ReportingObserver.options_parameter.types_property.csp-violation
---

{{APIRef("Reporting API")}}

The **`columnNumber`** read-only property of the {{domxref("CSPViolationReportBody")}} interface indicates the column number in the source file that triggered the [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP) violation.
The **`columnNumber`** property of the {{domxref("CSPViolationReport")}} dictionary indicates the character position in the source file line that triggered the [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP) violation.

This property is used with the {{domxref("CSPViolationReport.sourceFile")}} and {{domxref("CSPViolationReport.lineNumber")}} properties, which together provide the the exact location in the source that caused the violation.

Note that the browser extracts the value from _the global object_ of the file that triggered the violation.
If the resource that triggers the CSP violation is not loaded, the value will be `null`.
See {{domxref("CSPViolationReportBody.sourceFile")}} for more information.

This property is most useful alongside {{domxref("CSPViolationReportBody.sourceFile")}} and {{domxref("CSPViolationReportBody.lineNumber")}}, as it provides the location of the column in that file and line that resulted in a violation.
See {{domxref("CSPViolationReport.sourceFile")}} for more information.

## Value

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
---
title: "CSPViolationReportBody: disposition property"
title: "CSPViolationReport: disposition property"
short-title: disposition
slug: Web/API/CSPViolationReportBody/disposition
slug: Web/API/CSPViolationReport/disposition
page-type: web-api-instance-property
browser-compat: api.CSPViolationReportBody.disposition
browser-compat: api.ReportingObserver.ReportingObserver.options_parameter.types_property.csp-violation
---

{{APIRef("Reporting API")}}

The **`disposition`** read-only property of the {{domxref("CSPViolationReportBody")}} interface indicates whether the user agent is configured to enforce [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP) violations or only report them.
The **`disposition`** property of the {{domxref("CSPViolationReport")}} dictionary indicates whether the user agent is configured to enforce [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP) violations or only report them.

## Value

Possible values are:

- `"enforce"`
- : The policy is enforced and the resource request is blocked.
This is used for violations of policies set with {{httpheader("Content-Security-Policy")}}.
- `"report"`
- : The violation is reported but the resource request is not blocked.
This is used for violations of policies set with {{httpheader("Content-Security-Policy-Report-Only")}}.

## Examples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: "CSPViolationReportBody: documentURL property"
title: "CSPViolationReport: documentURL property"
short-title: documentURL
slug: Web/API/CSPViolationReportBody/documentURL
slug: Web/API/CSPViolationReport/documentURL
page-type: web-api-instance-property
browser-compat: api.CSPViolationReportBody.documentURL
browser-compat: api.ReportingObserver.ReportingObserver.options_parameter.types_property.csp-violation
---

{{APIRef("Reporting API")}}

The **`documentURL`** read-only property of the {{domxref("CSPViolationReportBody")}} interface is a string that represents the URL of the document or worker that violated the [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP).
The **`documentURL`** property of the {{domxref("CSPViolationReport")}} dictionary is a string that represents the URL of the document or worker that violated the [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP).

## Value

Expand Down Expand Up @@ -75,7 +75,7 @@ Each time the callback function is invoked, we get the body of the first entry o
// main.js
const observer = new ReportingObserver(
(reports, observer) => {
console.log(`documentURL: ${reports[0].body.referrer}`);
console.log(`documentURL: ${reports[0].body.documentURL}`);
console.log(`referrer: ${reports[0].body.referrer}`);
console.log(`blockedURL: ${reports[0].body.blockedURL}`);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: "CSPViolationReportBody: effectiveDirective property"
title: "CSPViolationReport: effectiveDirective property"
short-title: effectiveDirective
slug: Web/API/CSPViolationReportBody/effectiveDirective
slug: Web/API/CSPViolationReport/effectiveDirective
page-type: web-api-instance-property
browser-compat: api.CSPViolationReportBody.effectiveDirective
browser-compat: api.ReportingObserver.ReportingObserver.options_parameter.types_property.csp-violation
---

{{APIRef("Reporting API")}}

The **`effectiveDirective`** read-only property of the {{domxref("CSPViolationReportBody")}} interface is a string that represents the effective [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP) directive that was violated.
The **`effectiveDirective`** property of the {{domxref("CSPViolationReport")}} dictionary is a string that represents the effective [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP) directive that was violated.

Note that this contains the specific directive that was effectively violated, such as [`script-src-elem`](/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/script-src-elem) for violations related to script elements, and not the policy that was specified, which may have been the (more general) [`default-src`](/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/default-src).

Expand Down
Loading
Loading